<template>
    <div class="approval">
        <!-- 面包屑导航 -->
        <div class="page_top">
            <div class="left_btn" @click="back">
                <img src="../../assets/image/back.png" alt="" />
            </div>
            <crumbs basetitle="保险" title="日保设置" title1=""></crumbs>
        </div>
        <div class="outtabbox">
            <div class="outtabitem" @click="changeouttab(0)">
                <div class="content">
                    <div
                        :class="{
                            tabtext: true,
                            blueactiveword: outtabflag === 0
                        }"
                    >
                        方案管理
                    </div>
                </div>
                <div class="border_b">
                    <div
                        :class="{
                            line: true,
                            blueactiveline: outtabflag === 0
                        }"
                    ></div>
                </div>
            </div>
            <div class="outtabitem" @click="changeouttab(1)">
                <div class="content">
                    <div
                        :class="{
                            tabtext: true,
                            blueactiveword: outtabflag === 1
                        }"
                    >
                        行业管理
                    </div>
                </div>
                <div class="border_b">
                    <div
                        :class="{
                            line: true,
                            blueactiveline: outtabflag === 1
                        }"
                    ></div>
                </div>
            </div>
            <div class="outtabitem" @click="changeouttab(3)">
                <div class="content">
                    <div
                        :class="{
                            tabtext: true,
                            blueactiveword: outtabflag === 3
                        }"
                    >
                        行业方案管理
                    </div>
                </div>
                <div class="border_b">
                    <div
                        :class="{
                            line: true,
                            blueactiveline: outtabflag === 3
                        }"
                    ></div>
                </div>
            </div>
            <div class="outtabitem" @click="changeouttab(2)">
                <div class="content">
                    <div
                        :class="{
                            tabtext: true,
                            blueactiveword: outtabflag === 2
                        }"
                    >
                        保司管理
                    </div>
                </div>
                <div class="border_b">
                    <div
                        :class="{
                            line: true,
                            blueactiveline: outtabflag === 2
                        }"
                    ></div>
                </div>
            </div>
        </div>
        <div v-show="outtabflag === 0">
            <div class="paddingbox">
                <div class="formbox">
                    <div class="top">
                        <div class="toptext">筛选</div>
                        <div class="utils">
                            <div class="clear" @click="clearfaglform">
                                <img src="../../assets/image/容器.png" alt="" />
                                <span>清除</span>
                            </div>
                        </div>
                    </div>
                    <div class="formcontent">
                        <div class="formitem">
                            <div class="formitemflexone">
                                <div class="lable">保司：</div>
                                <el-select
                                    v-model="rbfainsureCompanyType"
                                    @change="changerbfainsureCompanyType"
                                    clearable
                                    class="m-2 inputw"
                                    placeholder="请选择"
                                >
                                    <el-option
                                        v-for="item in daybslist"
                                        :key="item.dictValue"
                                        :label="item.dictLabel"
                                        :value="item.dictValue"
                                    />
                                </el-select>
                            </div>
                            <div class="formitemflexone">
                                <div class="lable">方案名称：</div>
                                <el-select
                                    v-model="rbfplanCode"
                                    @change="getwesureplanlist"
                                    clearable
                                    class="m-2 inputw"
                                    placeholder="请选择"
                                >
                                    <el-option
                                        v-for="item in bsfalist"
                                        :key="item.dictValue"
                                        :label="item.dictLabel"
                                        :value="item.dictValue"
                                    />
                                </el-select>
                            </div>
                        </div>
                        <!-- <div class="formbtnitem">
                            <el-button type="primary" class="my_btn"><el-icon>
                                    <Plus />
                                </el-icon>新增方案</el-button>
                        </div> -->
                    </div>
                </div>
            </div>
            <div class="paddingbox">
                <div class="accounttable">
                    <div class="tableborder">
                        <el-table
                            :data="rbfptabledate"
                            style="width: 100%"
                            :header-cell-style="{
                                background: '#FAFAFC',
                                color: '#202536'
                            }"
                        >
                            <el-table-column prop="planName" label="方案名称" />
                            <el-table-column prop="remark" label="备注" />
                            <el-table-column
                                prop="wesurePlanJson"
                                width="500"
                                label="保障范围"
                            >
                                <template #default="scope">
                                    <div class="vforbox">
                                        <div
                                            class="vfboxitem"
                                            v-for="(
                                                ele, index
                                            ) in scope.row.wesurePlanJson
                                                .substring(
                                                    0,
                                                    scope.row.wesurePlanJson
                                                        .length - 1
                                                )
                                                .substr(1)
                                                .split(',')"
                                        >
                                            {{ ele.replace(/"/g, '') }}
                                        </div>
                                    </div>
                                </template>
                            </el-table-column>
                            <el-table-column prop="price" label="价格">
                                <template #default="scope">
                                    <div>￥{{ scope.row.price }}/天</div>
                                </template>
                            </el-table-column>
                            <el-table-column
                                prop="effectYearMonth"
                                label="生效年月"
                            />
                            <el-table-column prop="costPrice" label="成本保费">
                                <template #default="scope">
                                    <div
                                        v-if="
                                            scope.row.costPrice === '' ||
                                            scope.row.costPrice === null
                                        "
                                    >
                                        --
                                    </div>
                                    <div v-else>{{ scope.row.costPrice }}</div>
                                </template>
                            </el-table-column>
                            <el-table-column label="操作">
                                <template #default="scope">
                                    <div
                                        class="pointer blue"
                                        @click="editfagl(scope.row)"
                                    >
                                        修改
                                    </div>
                                </template>
                            </el-table-column>
                        </el-table>
                    </div>
                    <div class="paginationborder">
                        <pagination
                            :total="rbfapagetotal"
                            :currentPage="rbfapagenum"
                            :pageSize="rbfapagesize"
                            @SizeChange="changerbfapagesize"
                            @CurrentChange="changerbfapagenum"
                        ></pagination>
                    </div>
                </div>
            </div>
        </div>
        <div v-show="outtabflag === 1">
            <div class="paddingbox">
                <div class="formbox">
                    <div class="top">
                        <div class="toptext">筛选</div>
                        <div class="utils">
                            <div class="clear" @click="clearhyform">
                                <img src="../../assets/image/容器.png" alt="" />
                                <span>清除</span>
                            </div>
                        </div>
                    </div>
                    <div class="formcontent">
                        <div class="formitem">
                            <div class="formitemflexone">
                                <div class="lable">保司类型：</div>
                                <el-select
                                    v-model="hyglbslxselectvalue"
                                    @change="getwesureindustrylist"
                                    clearable
                                    class="m-2 inputw"
                                    placeholder="请选择"
                                >
                                    <el-option
                                        v-for="item in hyglbslxlist"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.value"
                                    />
                                </el-select>
                            </div>
                            <div class="formitemflexone">
                                <div class="lable">行业名称：</div>
                                <el-input
                                    v-model="hyname"
                                    @input="changehyname"
                                    style="width: 280px"
                                    placeholder="请输入"
                                    clearable
                                />
                            </div>
                            <div class="formitemflexone">
                                <div class="lable">编码名称：</div>
                                <el-input
                                    v-model="hybmname"
                                    @input="changehybmname"
                                    style="width: 280px"
                                    placeholder="请输入"
                                    clearable
                                />
                            </div>
                        </div>
                        <div class="formbtnitem">
                            <el-button
                                type="primary"
                                class="my_btn"
                                @click="addhytcopen"
                                ><el-icon> <Plus /> </el-icon
                                >新增行业</el-button
                            >
                        </div>
                    </div>
                </div>
            </div>
            <div class="paddingbox">
                <div class="accounttable">
                    <div class="tableborder">
                        <el-table
                            :data="hytabledate"
                            style="width: 100%"
                            :header-cell-style="{
                                background: '#FAFAFC',
                                color: '#202536'
                            }"
                        >
                            <el-table-column
                                align="center"
                                prop="productType"
                                label="保司类型"
                            >
                                <template #default="scope">
                                    <div v-if="scope.row.productType === 0">
                                        日日保
                                    </div>
                                    <div v-if="scope.row.productType === 1">
                                        团意保
                                    </div>
                                    <div v-if="scope.row.productType === 2">
                                        蚂蚁保
                                    </div>
                                </template>
                            </el-table-column>
                            <el-table-column
                                align="center"
                                prop="industryName"
                                label="行业名称"
                            />
                            <el-table-column
                                align="center"
                                prop="industryLevel"
                                label="工种类别"
                            >
                                <template #default="scope">
                                    <div>
                                        {{
                                            scope.row.industryLevel
                                                ? scope.row.industryLevel + '类'
                                                : '--'
                                        }}
                                    </div>
                                </template>
                            </el-table-column>
                            <el-table-column
                                label="编码"
                                align="center"
                                prop="industryTypeCode"
                            />
                            <!-- <el-table-column label="日日保行业工种编码" align="center" prop="industryTypeCode" />
                            <el-table-column label="团意险行业工种编码" align="center" prop="industryTypeCodeTYX" /> -->
                            <el-table-column
                                align="center"
                                prop="createTime"
                                label="创建时间"
                            />
                            <el-table-column align="center" label="操作">
                                <template #default="scope">
                                    <div
                                        class="blue pointer"
                                        @click="edithytcopen(scope.row)"
                                    >
                                        编辑
                                    </div>
                                </template>
                            </el-table-column>
                        </el-table>
                    </div>
                    <div class="paginationborder">
                        <pagination
                            :total="hytotal"
                            :currentPage="hypagenum"
                            :pageSize="hypagesize"
                            @SizeChange="changehypagesize"
                            @CurrentChange="changehypagenum"
                        ></pagination>
                    </div>
                </div>
            </div>
        </div>
        <div v-show="outtabflag === 3">
            <div class="paddingbox">
                <div class="formbox">
                    <div class="top">
                        <div class="toptext">筛选</div>
                        <div class="utils">
                            <div class="clear" @click="clearhyfaform">
                                <img src="../../assets/image/容器.png" alt="" />
                                <span>清除</span>
                            </div>
                        </div>
                    </div>
                    <div class="formcontent">
                        <div class="formitem">
                            <div class="formitemflexone">
                                <div class="lable">保司类型：</div>
                                <el-select
                                    v-model="hyfaglbslxselectvalue"
                                    @change="getwesureindustryplanlist"
                                    clearable
                                    class="m-2 inputw"
                                    placeholder="请选择"
                                >
                                    <el-option
                                        v-for="item in hyglbslxlist"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.value"
                                    />
                                </el-select>
                            </div>
                            <div class="formitemflexone">
                                <div class="lable">行业方案名称：</div>
                                <el-input
                                    v-model="hyfamc"
                                    style="width: 280px"
                                    @input="changehyfamc"
                                    placeholder="请输入"
                                    clearable
                                />
                            </div>
                            <div class="formitemflexone">
                                <div class="lable">行业名称：</div>
                                <el-input
                                    v-model="hyfaname"
                                    @input="changehyfaname"
                                    style="width: 280px"
                                    placeholder="请输入"
                                    clearable
                                />
                            </div>
                            <div class="formitemflexone">
                                <div class="lable">方案状态：</div>
                                <el-select
                                    v-model="hyfastatus"
                                    @change="getwesureindustryplanlist"
                                    class="m-2 inputw"
                                    placeholder="请选择"
                                >
                                    <el-option
                                        key="0"
                                        label="未启用"
                                        value="0"
                                    />
                                    <el-option
                                        key="1"
                                        label="已启用"
                                        value="1"
                                    />
                                    <el-option
                                        key="2"
                                        label="已禁用"
                                        value="2"
                                    />
                                </el-select>
                            </div>
                        </div>
                        <div class="formbtnitem" @click="ceditoraddhyfatcopen">
                            <el-button type="primary" class="my_btn"
                                ><el-icon> <Plus /> </el-icon
                                >新增行业方案</el-button
                            >
                        </div>
                    </div>
                </div>
            </div>
            <div class="paddingbox">
                <div class="accounttable">
                    <div class="tableborder">
                        <el-table
                            :data="hyfatabledate"
                            style="width: 100%; margin-top: 16px"
                            :header-cell-style="{
                                background: '#FAFAFC',
                                color: '#202536'
                            }"
                        >
                            <!-- <el-table-column type="expand">
                                <template #default="props">
                                    <div class="tableinnerbox">
                                        <div class="tableinnerboxitem"
                                            v-for="(ele, index) in props.row.wesureIndustryPlanList" :key="index">
                                            <div class="top">
                                                <div class="topitem">
                                                    <div class="lable">产品类型：</div>
                                                    <div class="lablecontent">{{ ele.productType == 0 ? '日日保' : '团意保' }}
                                                    </div>
                                                </div>
                                                <div class="topitem">
                                                    <div class="lable">应用方案：</div>
                                                    <div class="lablecontent">{{ ele.wesurePlanName }}</div>
                                                </div>
                                                <div class="topitem">
                                                    <div class="lable">工种编码：</div>
                                                    <div class="lablecontent">{{ ele.industryTypeCode }}</div>
                                                </div>
                                                <div class="topitem">
                                                    <div class="lable">价格：</div>
                                                    <div class="lablecontent">{{ ele.price }}</div>
                                                </div>
                                                <div class="topitem">
                                                    <div class="lable">方案状态：</div>
                                                    <div v-if="ele.state === 0" class="lablecontent">未启用</div>
                                                    <div v-else-if="ele.state == 1" class="lablecontent">已启用</div>
                                                    <div v-else class="lablecontent">禁用</div>
                                                </div>
                                                <div class="topitem">
                                                    <div class="blue pointer"
                                                        @click="hyfachangeprice(ele, props.row.industryPlanName)"
                                                        style="margin-left:5px;margin-right:5px">方案改价</div>
                                                    <div class="blue pointer" @click="hyfagjjltcopen(ele)"
                                                        style="margin-left:5px;margin-right:5px">改价记录
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="bottom">
                                                <div class="bottomitem">
                                                    <div class="lable">友情提示：</div>
                                                    <div class="lablecontent"
                                                        style="max-width:500px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; ">
                                                        {{ ele.industryPlanTip }}</div>
                                                </div>
                                                <div class="bottomitem">
                                                    <div class="lable">特别约定：</div>
                                                    <div class="lablecontent"
                                                        style="max-width:500px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; ">
                                                        {{ ele.industryPlanClause }}</div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </template>
                            </el-table-column> -->
                            <!-- <el-table-column prop="id" label="行业方案ID" /> -->
                            <el-table-column
                                prop="productType"
                                label="保司类型"
                            >
                                <template #default="scope">
                                    <div v-if="scope.row.productType === 0">
                                        日日保
                                    </div>
                                    <div v-if="scope.row.productType === 1">
                                        团意保
                                    </div>
                                    <div v-if="scope.row.productType === 2">
                                        蚂蚁保
                                    </div>
                                </template>
                            </el-table-column>
                            <el-table-column
                                prop="industryPlanName"
                                label="行业方案名称"
                            />
                            <el-table-column
                                prop="industryName"
                                label="行业名称"
                            />
                            <el-table-column
                                prop="industryLevel"
                                label="工种类别"
                            >
                                <template #default="scope">
                                    <div>
                                        {{
                                            scope.row.industryLevel
                                                ? scope.row.industryLevel + '类'
                                                : '--'
                                        }}
                                    </div>
                                </template>
                            </el-table-column>
                            <el-table-column
                                prop="wesurePlanName"
                                label="应用方案"
                            />
                            <el-table-column
                                prop="wesurePlanCode"
                                label="工种编码"
                            />
                            <el-table-column prop="price" label="价格" />
                            <el-table-column prop="state" label="方案状态">
                                <template #default="scope">
                                    <div v-if="scope.row.state === 0">
                                        未启用
                                    </div>
                                    <div v-if="scope.row.state === 1">
                                        已启用
                                    </div>
                                    <div v-if="scope.row.state === 2">禁用</div>
                                </template>
                            </el-table-column>
                            <el-table-column
                                prop="industryPlanTip"
                                label="友情提示"
                            >
                                <template #default="scope">
                                    <el-tooltip
                                        v-if="scope.row.industryPlanTip"
                                        class="box-item"
                                        effect="dark"
                                        placement="left"
                                    >
                                        <template #content>
                                            <div class="w-200">
                                                {{ scope.row.industryPlanTip }}
                                            </div>
                                        </template>

                                        <div class="slh">
                                            {{ scope.row.industryPlanTip }}
                                        </div>
                                    </el-tooltip>
                                </template>
                            </el-table-column>
                            <el-table-column
                                prop="industryPlanClause"
                                label="特别约定"
                            >
                                <template #default="scope">
                                    <el-tooltip
                                        v-if="scope.row.industryPlanClause"
                                        class="box-item"
                                        effect="dark"
                                        placement="left"
                                    >
                                        <template #content>
                                            <div class="w-200">
                                                {{
                                                    scope.row.industryPlanClause
                                                }}
                                            </div>
                                        </template>
                                        <div class="slh">
                                            {{ scope.row.industryPlanClause }}
                                        </div>
                                    </el-tooltip>
                                </template>
                            </el-table-column>
                            <el-table-column label="操作" width="250">
                                <template #default="scope">
                                    <div
                                        style="
                                            display: flex;
                                            align-item: center;
                                            justify-content: space-between;
                                        "
                                    >
                                        <div
                                            class="blue pointer"
                                            @click="
                                                editoraddhyfatcopen(scope.row)
                                            "
                                        >
                                            编辑行业方案
                                        </div>
                                        <div
                                            v-if="scope.row.productType === 0"
                                            class="blue pointer"
                                            @click="hyfachangeprice(scope.row)"
                                        >
                                            改价
                                        </div>
                                        <div
                                            v-if="scope.row.productType === 0"
                                            class="blue pointer"
                                            @click="hyfagjjltcopen(scope.row)"
                                        >
                                            改价记录
                                        </div>
                                    </div>
                                </template>
                            </el-table-column>
                        </el-table>
                    </div>
                    <div class="paginationborder">
                        <pagination
                            :total="hyfatotal"
                            :currentPage="hyfapagenum"
                            :pageSize="hyfapagesize"
                            @SizeChange="changehyfapagesize"
                            @CurrentChange="changehyfapagenum"
                        ></pagination>
                    </div>
                </div>
            </div>
        </div>
        <div v-show="outtabflag === 2">
            <div class="paddingbox">
                <div class="flexbox">
                    <div class="paddingbox_l">
                        <div class="paddingbox_ltitle">
                            <div>保司列表</div>
                            <img
                                src="../../assets//image/添加部门.png"
                                alt=""
                                @click="tjbsfatcopen"
                            />
                        </div>
                        <div
                            v-for="(ele, index) in bslist"
                            :class="{
                                insurecompanylist: true,
                                insurecompanylistactive:
                                    insurecompanyflag === index
                            }"
                            @click="changeinsurecompany(index, ele)"
                        >
                            <el-popover
                                placement="top-start"
                                :width="200"
                                trigger="hover"
                            >
                                <template #reference>
                                    <img
                                        class="insurelogo"
                                        crossorigin="anonymous"
                                        :src="ele.logo"
                                        alt=""
                                    />
                                </template>
                                <div style="display: flex; align-items: center">
                                    <div>
                                        <img
                                            style="
                                                width: 42px;
                                                height: 42px;
                                                margin-right: 12px;
                                            "
                                            crossorigin="anonymous"
                                            :src="ele.logo"
                                            alt=""
                                        />
                                    </div>
                                    <div>
                                        <div style="font-size: 14px">
                                            {{ ele.name }}
                                        </div>
                                        <div
                                            style="
                                                font-size: 12px;
                                                color: #9497b1;
                                            "
                                            class="insurepopovertype"
                                        >
                                            保司
                                        </div>
                                    </div>
                                </div>
                                <div
                                    style="
                                        font-size: 12px;
                                        color: #555c6a;
                                        margin-top: 12px;
                                    "
                                >
                                    <div>
                                        <span>保司编码：</span
                                        ><span>period_001_zgrs</span>
                                    </div>
                                    <div>
                                        <span>出单类型：</span
                                        ><span>{{ ele.insureMode }}</span>
                                    </div>
                                </div>
                            </el-popover>
                            <div class="companyinfo">
                                <div>
                                    <span class="insurename">{{
                                        ele.name
                                    }}</span
                                    ><span class="insureengname">{{
                                        ele.insureMode
                                    }}</span>
                                </div>
                                <div class="insurecode">{{ ele.code }}</div>
                            </div>
                            <el-popover
                                placement="top-start"
                                :width="118"
                                trigger="hover"
                            >
                                <template #reference>
                                    <img
                                        class="moreimg"
                                        src="../../assets/image/组871.png"
                                        alt=""
                                    />
                                </template>
                                <div
                                    class="popoverfn"
                                    @click="
                                        delinsurComInsuranceCompanyfn(ele.code)
                                    "
                                >
                                    删除
                                </div>
                                <div
                                    class="popoverfn"
                                    @click="bsglfalbtcopen(ele)"
                                >
                                    方案列表
                                </div>
                            </el-popover>
                        </div>
                    </div>
                    <div class="paddingbox_r">
                        <div class="toptitle">保司保单号</div>
                        <div class="form">
                            <div>
                                <span>生效年月：</span>
                                <el-date-picker
                                    v-model="bsbdhdate"
                                    @change="
                                        getinsurComInsuranceCompanygetScheme
                                    "
                                    value-format="YYYY-MM"
                                    type="month"
                                    placeholder="选择日期"
                                />
                            </div>
                            <el-button
                                type="primary"
                                size="default"
                                class="my_btn"
                                @click="plsetbdhtcopen"
                                ><el-icon> <Plus /> </el-icon
                                >批量保单号</el-button
                            >
                        </div>
                        <div style="margin-top: 12px">
                            <el-table
                                :data="
                                    getinsurComInsuranceCompanygetSchemetabledate
                                "
                                style="width: 100%; margin-top: 16px"
                                :header-cell-style="{
                                    background: '#FAFAFC',
                                    color: '#202536'
                                }"
                            >
                                <el-table-column
                                    prop="insureCompanyType"
                                    label="保司编码"
                                />
                                <el-table-column
                                    prop="planCode"
                                    label="方案编码"
                                />
                                <el-table-column
                                    prop="planName"
                                    label="方案名称"
                                />
                                <el-table-column
                                    prop="policyNo"
                                    label="保单号"
                                />
                                <el-table-column
                                    prop="yearMonth"
                                    label="月份"
                                />
                                <el-table-column label="操作">
                                    <template #default="scope">
                                        <div
                                            class="blue pointer"
                                            @click="editpolicytcopen(scope.row)"
                                        >
                                            修改
                                        </div>
                                    </template>
                                </el-table-column>
                            </el-table>
                        </div>
                        <div>
                            <pagination
                                :total="
                                    getinsurComInsuranceCompanygetSchemetotal
                                "
                                :currentPage="
                                    getinsurComInsuranceCompanygetSchemepagenum
                                "
                                :pageSize="
                                    getinsurComInsuranceCompanygetSchemepagesize
                                "
                                @SizeChange="
                                    changegetinsurComInsuranceCompanygetSchemepagesize
                                "
                                @CurrentChange="
                                    changegetinsurComInsuranceCompanygetSchemepagenum
                                "
                            ></pagination>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <el-drawer
            v-model="changedayinsurefatc"
            class="drawer"
            title="修改日保方案"
            direction="rtl"
            :size="isMobile ? '100%' : '35%'"
        >
            <div class="closedrawer" @click="changedayinsurefatc = false">
                <span>收</span><span>起</span
                ><img src="../../assets/image/组355.png" alt="" />
            </div>
            <div class="tcbox">
                <div class="titlebox">基础信息</div>
                <div class="formbox">
                    <div class="formboxitem">
                        <div class="lable">
                            保险公司<span class="red">*</span>
                        </div>
                        <div class="lablecontent">
                            <el-select
                                v-model="editfaform.bxgs"
                                @change="changeeditfaformbxgs"
                                clearable
                                class="m-2 inputw"
                                placeholder="请选择"
                            >
                                <el-option
                                    v-for="item in cdaybslist"
                                    :key="item.dictValue"
                                    :label="item.dictLabel"
                                    :value="item.dictValue"
                                />
                            </el-select>
                        </div>
                        <div class="lable">
                            生效年月<span class="red">*</span>
                        </div>
                        <div class="lablecontent">
                            <el-date-picker
                                v-model="editfaform.date"
                                value-format="YYYY-MM"
                                type="month"
                                placeholder="请选择"
                            />
                        </div>
                        <div class="lable">备注：</div>
                        <div class="lablecontent">
                            <el-input
                                v-model="editfaform.remark"
                                maxlength="40"
                                placeholder="请输入"
                                show-word-limit
                                type="text"
                            />
                        </div>
                    </div>
                    <div class="formboxitem">
                        <div class="lable">
                            方案名称<span class="red">*</span>
                        </div>
                        <div class="lablecontent">
                            <el-select
                                v-model="editfaform.faname"
                                clearable
                                class="m-2 inputw"
                                placeholder="请选择"
                            >
                                <el-option
                                    v-for="item in cbsfalist"
                                    :key="item.dictValue"
                                    :label="item.dictLabel"
                                    :value="item.dictValue"
                                />
                            </el-select>
                        </div>
                        <div class="lable">
                            方案别称<span class="red">*</span>
                        </div>
                        <div class="lablecontent">
                            <el-switch v-model="editfaform.hasfabc" />
                        </div>
                        <div class="lable">别名名称</div>
                        <div class="lablecontent">
                            <el-input
                                v-model="editfaform.fabm"
                                placeholder="请输入"
                            />
                        </div>
                    </div>
                </div>
                <div class="titlebox">方案金额信息</div>
                <div class="formbox">
                    <div class="formboxitem">
                        <div v-for="(ele, index) in wesureScopeList">
                            <div class="lable">{{ ele.split(':')[0] }}</div>
                            <div
                                v-if="ele.split(':')[0] === '工伤残疾'"
                                class="lablecontent"
                            >
                                <el-input
                                    v-model="editfaform.gscj"
                                    placeholder="请输入"
                                />
                            </div>
                            <div
                                v-else-if="ele.split(':')[0] === '住院津贴'"
                                class="lablecontent"
                            >
                                <el-input
                                    v-model="editfaform.zyjt"
                                    placeholder="请输入"
                                />
                            </div>
                            <div
                                v-else-if="ele.split(':')[0] === '工伤赔付'"
                                class="lablecontent"
                            >
                                <el-input
                                    v-model="editfaform.gspf"
                                    placeholder="请输入"
                                />
                            </div>
                            <div
                                v-else-if="ele.split(':')[0] === '工伤意外医疗'"
                                class="lablecontent"
                            >
                                <el-input
                                    v-model="editfaform.gsywyl"
                                    placeholder="请输入"
                                />
                            </div>
                        </div>
                    </div>
                    <div class="formboxitem">
                        <div class="lable">成本保费</div>
                        <div class="lablecontent">
                            <el-input
                                v-model="editfaform.cbbf"
                                placeholder="请输入"
                            />
                        </div>
                        <div class="lable">价格</div>
                        <div class="lablecontent">
                            <el-input
                                v-model="editfaform.price"
                                placeholder="请输入"
                            />
                        </div>
                        <div class="lable">单位</div>
                        <div class="lablecontent">
                            <el-input
                                v-model="editfaform.dw"
                                placeholder="请输入"
                            />
                        </div>
                        <div class="lable"></div>
                        <div class="lablecontent"></div>
                    </div>
                </div>
            </div>
            <!-- <template #footer>
                <div class="flexcenterbox">
                    <el-button type="primary" class="my_btn">通过</el-button>
                </div>
            </template> -->
        </el-drawer>
        <!-- 编辑投保行业  行业弹窗 -->
        <el-dialog width="350" v-model="edithytc" title="编辑投保行业">
            <div class="tbhyform">
                <div class="lable">保司类型<span class="red">*</span></div>
                <div class="lablecontent">
                    <el-select
                        v-model="edithttype"
                        disabled
                        class="m-2"
                        placeholder="请选择保司类型"
                        style="width: 100%"
                    >
                        <el-option
                            v-for="item in hyglbslxlist"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                        />
                    </el-select>
                </div>
                <div class="lable">行业名称<span class="red">*</span></div>
                <div class="lablecontent">
                    <el-input v-model="edithyname" placeholder="请输入" />
                </div>
                <div class="lable" v-if="edithttype === 2">
                    工种类别<span class="red">*</span>
                </div>
                <div class="lablecontent" v-if="edithttype === 2">
                    <el-select
                        disabled
                        v-model="edithyglgzlbvalue"
                        class="m-2"
                        placeholder="请选择工种类别"
                        style="width: 100%"
                    >
                        <el-option
                            v-for="item in hyglgzlblist"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                        />
                    </el-select>
                </div>
                <div class="lable">行业工种编码</div>
                <div class="lablecontent">
                    <el-input v-model="edithycode" placeholder="请输入" />
                </div>
                <!-- <div class="lable" v-show="editflag === 1 || editflag === 3">日日保行业工种编码</div>
                <div class="lablecontent" v-show="editflag === 1 || editflag === 3"><el-input v-model="edithydaycode"
                        placeholder="请输入" /></div>
                <div class="lable" v-show="editflag === 2 || editflag === 3">团意日保行业工种编码</div>
                <div class="lablecontent" v-show="editflag === 2 || editflag === 3"><el-input v-model="edithytyrbcode"
                        placeholder="请输入" /></div> -->
            </div>
            <template #footer>
                <span class="flexcenterbox">
                    <el-button @click="edithytc = false">取消</el-button>
                    <el-button type="primary" @click="edithysure">
                        确定
                    </el-button>
                </span>
            </template>
        </el-dialog>
        <!-- 添加投保行业  行业弹窗 -->
        <el-dialog width="350" v-model="addhytc" title="新建投保行业">
            <div class="tbhyform">
                <div class="lable">保司类型<span class="red">*</span></div>
                <div class="lablecontent">
                    <el-select
                        v-model="hyglbslxvalue"
                        class="m-2"
                        placeholder="请选择保司类型"
                        style="width: 100%"
                    >
                        <el-option
                            v-for="item in hyglbslxlist"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                        />
                    </el-select>
                </div>
                <div class="lable">行业名称<span class="red">*</span></div>
                <div class="lablecontent">
                    <el-input v-model="addhyname" placeholder="请输入" />
                </div>
                <div class="lable" v-if="hyglbslxvalue === 2">
                    工种类别<span class="red">*</span>
                </div>
                <div class="lablecontent" v-if="hyglbslxvalue === 2">
                    <el-select
                        v-model="hyglgzlbvalue"
                        class="m-2"
                        placeholder="请选择工种类别"
                        style="width: 100%"
                    >
                        <el-option
                            v-for="item in hyglgzlblist"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                        />
                    </el-select>
                </div>
                <div class="lable">行业工种编码</div>
                <div class="lablecontent">
                    <el-input v-model="addhycode" placeholder="请输入" />
                </div>
                <!-- <div class="lable">日日保行业工种编码</div>
                <div class="lablecontent"><el-input v-model="addhydaycode" placeholder="请输入" /></div>
                <div class="lable">团意日保行业工种编码</div>
                <div class="lablecontent"><el-input v-model="addhytyrbcode" placeholder="请输入" /></div> -->
            </div>
            <template #footer>
                <span class="flexcenterbox">
                    <el-button @click="addhytc = false">取消</el-button>
                    <el-button type="primary" @click="addhysure">
                        确定
                    </el-button>
                </span>
            </template>
        </el-dialog>
        <el-dialog width="350" v-model="hyfachangepricetc" title="方案改价">
            <div class="hyfaqgjbox">
                <div class="hyfagjformitem">
                    <div class="lable">行业方案名称：</div>
                    <div class="lablecontent">{{ hyfagjhyfamc }}</div>
                </div>
                <div class="hyfagjformitem">
                    <div class="lable">保险方案名称：</div>
                    <div class="lablecontent">{{ hyfagjbxfamc }}</div>
                </div>
                <div class="hyfagjformitem">
                    <div class="lable">单位：</div>
                    <div class="lablecontent">{{ hyfagjdw }}</div>
                </div>
                <div class="hyfagjformitem">
                    <div class="lable">当前价格：</div>
                    <div class="lablecontent">{{ hyfagjjg }}</div>
                </div>
                <div class="hyfagjformitem">
                    <div class="lable">修改价格：</div>
                    <div class="lablecontent">
                        <el-input
                            v-model="hyfagjnewjg"
                            placeholder="请输入修改价格"
                        />
                    </div>
                </div>
                <div class="hyfagjformitem">
                    <div class="lable">生效时间：</div>
                    <div class="lablecontent">
                        <el-date-picker
                            value-format="YYYY-MM-DD"
                            v-model="hyfagjdate"
                            type="date"
                            placeholder="请选择生效时间"
                        />
                    </div>
                </div>
            </div>
            <template #footer>
                <span class="flexcenterbox">
                    <el-button @click="hyfachangepricetc = false"
                        >取消</el-button
                    >
                    <el-button type="primary" @click="hyfaxgjgok">
                        确定
                    </el-button>
                </span>
            </template>
        </el-dialog>
        <el-dialog v-model="hyfagjjltc" title="改价记录" :width="isMobile ? '960' : '50%'">
            <div class="tableborder">
                <el-table :data="hyfagjjltabledate" height="600px">
                    <el-table-column property="effectDay" label="生效日期" />
                    <el-table-column property="oldPrice" label="修改前价格" />
                    <el-table-column property="newPrice" label="修改后价格" />
                    <el-table-column property="createTime" label="创建时间" />
                    <el-table-column property="updateTime" label="更新时间" />
                </el-table>
            </div>
        </el-dialog>
        <!-- 方案活动列表弹窗 -->
        <el-dialog
            v-model="bsglfalbtc"
            :title="bsglfalbname + '保司方案列表'"
            top="8vh"
            :width="isMobile ? '1150' : '60%'"
        >
            <div class="insureplanactivitybox">
                <div class="left">
                    <el-table
                        :data="bsglfllisttabledate"
                        style="width: 100%; margin-top: 0px"
                        height="600px"
                        :header-cell-style="{
                            background: '#FAFAFC',
                            color: '#202536'
                        }"
                    >
                        <el-table-column
                            align="center"
                            prop="solutionCode"
                            label="方案编码"
                        />
                        <el-table-column
                            align="center"
                            prop="solutionName"
                            label="方案名称"
                        />
                        <el-table-column align="center" label="操作">
                            <template #default="scope">
                                <span
                                    style="margin-right: 5px"
                                    class="pointer blue"
                                    @click="changebsglfalb(scope.row)"
                                    >修改</span
                                >
                                <span
                                    style="margin-right: 5px"
                                    class="pointer red"
                                    @click="deleteSchemesfn(scope.row)"
                                    >删除</span
                                >
                            </template>
                        </el-table-column>
                    </el-table>
                    <pagination
                        :total="bsglfllisttotal"
                        :currentPage="bsglfllistpagenum"
                        :pageSize="bsglfllistpagesize"
                        @SizeChange="changebsglfllistpagesize"
                        @CurrentChange="changebsglfllistpagenum"
                    >
                    </pagination>
                </div>
                <div class="right">
                    <div class="righttitle">
                        {{
                            isaddinsureplanactiveflag === true
                                ? '添加保司方案'
                                : '修改保司方案'
                        }}
                    </div>
                    <div class="rightform">
                        <div class="formitem">
                            <div class="lable">
                                &ensp;方案名称：&emsp;&emsp;
                            </div>
                            <div class="lablecontent">
                                <el-input
                                    style="width: 220px"
                                    v-model="bsglfamc"
                                    disabled
                                    placeholder="请输入"
                                />
                            </div>
                        </div>
                        <div class="formitem">
                            <div class="lable">
                                <span class="red">*</span>方案金额：&emsp;&emsp;
                            </div>
                            <div class="lablecontent">
                                <el-select
                                    @change="changebsglfaje"
                                    v-model="bsglfaje"
                                    style="width: 220px"
                                    placeholder="请选择"
                                >
                                    <el-option
                                        key="30W"
                                        label="30万"
                                        value="30W"
                                    />
                                    <el-option
                                        key="50W"
                                        label="50万"
                                        value="50W"
                                    />
                                    <el-option
                                        key="80W"
                                        label="80万"
                                        value="80W"
                                    />
                                    <el-option
                                        key="100W"
                                        label="100万"
                                        value="100W"
                                    />
                                    <el-option
                                        key="120W"
                                        label="120万"
                                        value="120W"
                                    />
                                </el-select>
                            </div>
                        </div>
                        <div class="formitem">
                            <div class="lable" style="width: 220px">
                                系统自动生成方案编码：
                            </div>
                            <div class="lablecontent">
                                <el-switch
                                    @change="changebsglautosc"
                                    v-model="bsglautosc"
                                />
                            </div>
                        </div>
                        <div class="formitem" v-show="showbsglfabm">
                            <div class="lable">
                                &ensp;方案编码：&emsp;&emsp;
                            </div>
                            <div class="lablecontent">
                                <el-input
                                    style="width: 220px"
                                    v-model="bsglfabm"
                                    placeholder="请输入"
                                />
                            </div>
                        </div>
                        <div class="flexcenterbox" style="margin-bottom: 20px">
                            <el-button class="my_cancelbtn" @click="calcel"
                                >取消</el-button
                            >
                            <el-button class="my_btn" @click="sure"
                                >确定</el-button
                            >
                        </div>
                    </div>
                </div>
            </div>
        </el-dialog>
        <el-dialog v-model="plsetbdhtc" title="批量设置保单号" width="600px">
            <div class="plsetbdhbox">
                <div class="plsetbdhboxitem">
                    <div class="lable">保司编码:</div>
                    <div class="lablecontent">
                        <el-input
                            v-model="bsbm"
                            style="width: 200px"
                            placeholder="请输入"
                        />
                    </div>
                </div>
                <div
                    class="plsetbdhboxitem"
                    v-for="(
                        ele, index
                    ) in cgetinsurComInsuranceCompanygetSchemetabledate"
                    :key="index"
                >
                    <div class="lable">{{ ele.solutionName }}:</div>
                    <div class="lablecontent">
                        <el-input
                            v-model="ele.policyNo"
                            style="width: 200px"
                            placeholder="请输入"
                        />
                    </div>
                </div>
                <div class="plsetbdhboxitem">
                    <div class="lable"><span class="red">*</span>生效年月:</div>
                    <div class="lablecontent">
                        <el-date-picker
                            style="width: 200px"
                            v-model="sxny"
                            value-format="YYYY-MM"
                            type="month"
                            placeholder="请选择"
                        />
                    </div>
                </div>
            </div>
            <div class="flexcenterbox" style="margin-bottom: 20px">
                <el-button class="my_cancelbtn" @click="plsetbdhtc = false"
                    >取消</el-button
                >
                <el-button class="my_btn" @click="sureadd">确定</el-button>
            </div>
        </el-dialog>
        <!-- 新增保司 -->
        <el-dialog v-model="tjbsfatc" title="添加保司方案" width="600px">
            <div class="plsetbdhbox">
                <div class="plsetbdhboxitem">
                    <div class="lable"><span class="red">*</span>保司名称:</div>
                    <div class="lablecontent">
                        <el-input
                            v-model="addbsmc"
                            style="width: 200px"
                            placeholder="请输入"
                        />
                    </div>
                </div>
                <div class="plsetbdhboxitem">
                    <div class="lable"><span class="red">*</span>方案编码:</div>
                    <div class="lablecontent">
                        <el-input
                            v-model="addbsfabm"
                            style="width: 200px"
                            placeholder="请输入"
                        />
                    </div>
                </div>
                <div class="plsetbdhboxitem">
                    <div class="lable"><span class="red">*</span>保司logo:</div>
                    <div class="lablecontent">
                        <el-upload
                            ref="bullpayuploadRef"
                            class="upload-demo"
                            :file-list="bullpayfileList"
                            :on-change="bullpayonChange"
                            accept=".png,.jpeg,.jpg"
                            :limit="1"
                            :auto-upload="false"
                        >
                            <template #trigger>
                                <el-button type="primary" class="my_btn"
                                    >选择文件</el-button
                                >
                            </template>
                            <template #tip>
                                <div class="el-upload__tip">
                                    大小限制5MB，支持png、jpeg、jpg格式文件
                                </div>
                            </template>
                        </el-upload>
                    </div>
                </div>
            </div>
            <div class="flexcenterbox" style="margin-bottom: 20px">
                <el-button class="my_cancelbtn" @click="addbscancel"
                    >取消</el-button
                >
                <el-button class="my_btn" @click="addbssure">确定</el-button>
            </div>
        </el-dialog>
        <!-- 编辑行业方案 -->
        <el-drawer
            v-model="editoraddhyfatc"
            class="drawer"
            :title="isadd ? '添加' + '行业方案' : '编辑' + '行业方案'"
            direction="rtl"        
            :size="isMobile ? '100%' : '35%'"
        >
            <div class="closedrawer" @click="editoraddhyfatc = false">
                <span>收</span><span>起</span
                ><img src="../../assets/image/组355.png" alt="" />
            </div>
            <div class="tcbox">
                <div class="formbox">
                    <div class="formboxitem">
                        <div class="lable">
                            保司类型<span class="red">*</span>
                        </div>
                        <div class="lablecontent">
                            <el-select
                                v-model="addhyfagltypelistvalue"
                                class="m-2"
                                @change="changeaddhyfagltypelistvalue"
                                placeholder="请选择保司类型"
                                style="width: 100%"
                            >
                                <el-option
                                    v-for="item in hyglbslxlist"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value"
                                />
                            </el-select>
                        </div>
                    </div>
                </div>
                <div class="titlebox">基础信息</div>
                <div class="formbox">
                    <div class="formboxitem">
                        <div class="lable">
                            行业方案名称<span class="red">*</span>
                        </div>
                        <div class="lablecontent">
                            <el-input
                                v-model="editoraddhyfa.hyfamc"
                                placeholder="请输入"
                            />
                        </div>
                    </div>
                    <div class="formboxitem">
                        <div class="lable">行业<span class="red">*</span></div>
                        <div class="lablecontent">
                            <el-select
                                v-model="editoraddhyfa.hy"
                                style="width: 100%"
                                clearable
                                class="m-2 inputw"
                                placeholder="请选择"
                            >
                                <el-option
                                    v-for="item in editoraddhylist"
                                    :key="item.industryName"
                                    :label="item.industryName"
                                    :value="item.industryName"
                                />
                            </el-select>
                        </div>
                    </div>
                </div>
                <div class="formbox" v-if="addhyfagltypelistvalue === 2">
                    <div class="formboxitem">
                        <div class="lable">
                            工种类别<span class="red">*</span>
                        </div>
                        <div class="lablecontent">
                            <el-select
                                v-model="addhyfaglgzlbvalue"
                                class="m-2"
                                placeholder="请选择工种类别"
                                style="width: 100%"
                            >
                                <el-option
                                    v-for="item in hyglgzlblist"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value"
                                />
                            </el-select>
                        </div>
                    </div>
                </div>
                <div v-if="addhyfagltypelistvalue === 0">
                    <div class="titlebox">日日保</div>
                    <div class="formbox">
                        <div class="formboxitem">
                            <div class="lable">保司</div>
                            <div class="lablecontent">
                                <el-select
                                    @change="changeeditoraddhyfadaybs"
                                    v-model="editoraddhyfa.daybs"
                                    style="width: 100%"
                                    clearable
                                    class="m-2 inputw"
                                    placeholder="请选择"
                                >
                                    <el-option
                                        v-for="item in editoradddaybalist"
                                        :key="item.code"
                                        :label="item.name"
                                        :value="item.code"
                                    />
                                </el-select>
                            </div>
                        </div>
                        <div class="formboxitem">
                            <div class="lable">应用方案</div>
                            <div class="lablecontent">
                                <el-select
                                    v-model="editoraddhyfa.dayyyfa"
                                    style="width: 100%"
                                    clearable
                                    class="m-2 inputw"
                                    placeholder="请选择"
                                >
                                    <el-option
                                        v-for="item in editoradddayfalist"
                                        :key="item.solutionCode"
                                        :label="item.solutionName"
                                        :value="item.solutionCode"
                                    />
                                </el-select>
                            </div>
                        </div>
                    </div>
                    <div class="formbox">
                        <div class="formboxitem">
                            <div class="lable">行业方案价格</div>
                            <div class="lablecontent">
                                <el-input
                                    :disabled="!isadd"
                                    v-model="editoraddhyfa.dayhyfajg"
                                    placeholder="请输入"
                                />
                            </div>
                        </div>
                        <div class="formboxitem" v-show="!isadd">
                            <div class="lable">方案状态</div>
                            <div class="lablecontent">
                                <el-select
                                    v-model="editoraddhyfa.dayfazt"
                                    style="width: 100%"
                                    clearable
                                    class="m-2 inputw"
                                    placeholder="请选择"
                                >
                                    <el-option
                                        :key="0"
                                        label="未启用"
                                        :value="0"
                                    />
                                    <el-option
                                        :key="1"
                                        label="已启用"
                                        :value="1"
                                    />
                                    <el-option
                                        :key="2"
                                        label="已禁用"
                                        :value="2"
                                    />
                                </el-select>
                            </div>
                        </div>
                    </div>
                    <div class="lable" style="padding: 0 11px"></div>
                    <!--                <div class="lablecontent" style="padding: 0 11px;">-->
                    <!--                    <el-input v-model="editoraddhyfa.dayhyfajg" placeholder="请输入" />-->
                    <!--                </div>-->
                    <div class="lable" style="padding: 0 11px">友情提示</div>
                    <div class="lablecontent" style="padding: 0 11px">
                        <el-input
                            v-model="editoraddhyfa.dayyqts"
                            placeholder="请输入"
                        />
                    </div>
                    <div class="lable" style="padding: 0 11px">特别约定</div>
                    <div class="lablecontent" style="padding: 0 11px">
                        <el-input
                            v-model="editoraddhyfa.daytbyd"
                            placeholder="请输入"
                        />
                    </div>
                </div>
                <div v-if="addhyfagltypelistvalue === 1">
                    <div class="titlebox">团意日保</div>
                    <div class="formbox">
                        <div class="formboxitem">
                            <div class="lable">保司</div>
                            <div class="lablecontent">
                                <el-select
                                    @change="changeeditoraddhyfatyrbbs"
                                    v-model="editoraddhyfa.tyrbbs"
                                    style="width: 100%"
                                    clearable
                                    class="m-2 inputw"
                                    placeholder="请选择"
                                >
                                    <el-option
                                        v-for="item in editoraddtyrbbalist"
                                        :key="item.code"
                                        :label="item.name"
                                        :value="item.code"
                                    />
                                </el-select>
                            </div>
                        </div>
                        <div class="formboxitem">
                            <div class="lable">应用方案</div>
                            <div class="lablecontent">
                                <el-select
                                    v-model="editoraddhyfa.tyrbyyfa"
                                    style="width: 100%"
                                    clearable
                                    class="m-2 inputw"
                                    placeholder="请选择"
                                >
                                    <el-option
                                        v-for="item in editoraddtyrbfalist"
                                        :key="item.solutionCode"
                                        :label="item.solutionName"
                                        :value="item.solutionCode"
                                    />
                                </el-select>
                            </div>
                        </div>
                    </div>
                    <div class="formbox">
                        <div class="formboxitem">
                            <div class="lable">
                                行业方案价格<el-tooltip
                                    content="设置团意险方案价格需与保司方案价格一致"
                                    placement="top"
                                    effect="light"
                                >
                                    <img
                                        style="margin-left: 10px"
                                        src="../../assets/image/vector.png"
                                        alt=""
                                    />
                                </el-tooltip>
                            </div>
                            <div class="lablecontent">
                                <el-input
                                    :disabled="!isadd"
                                    v-model="editoraddhyfa.tyrbhyfajg"
                                    placeholder="请输入"
                                />
                            </div>
                        </div>
                        <div class="formboxitem" v-show="!isadd">
                            <div class="lable">方案状态</div>
                            <div class="lablecontent">
                                <el-select
                                    v-model="editoraddhyfa.tyrbfazt"
                                    style="width: 100%"
                                    clearable
                                    class="m-2 inputw"
                                    placeholder="请选择"
                                >
                                    <el-option
                                        :key="0"
                                        label="未启用"
                                        :value="0"
                                    />
                                    <el-option
                                        :key="1"
                                        label="已启用"
                                        :value="1"
                                    />
                                    <el-option
                                        :key="2"
                                        label="已禁用"
                                        :value="2"
                                    />
                                </el-select>
                            </div>
                        </div>
                    </div>
                    <div class="lable" style="padding: 0 11px">友情提示</div>
                    <div class="lablecontent" style="padding: 0 11px">
                        <el-input
                            v-model="editoraddhyfa.tyrbyqts"
                            placeholder="请输入"
                        />
                    </div>
                    <div class="lable" style="padding: 0 11px">特别约定</div>
                    <div class="lablecontent" style="padding: 0 11px">
                        <el-input
                            v-model="editoraddhyfa.tyrbtbyd"
                            placeholder="请输入"
                        />
                    </div>
                </div>
                <div v-if="addhyfagltypelistvalue === 2">
                    <div class="titlebox">蚂蚁保</div>
                    <div class="formbox">
                        <div class="formboxitem">
                            <div class="lable">保司</div>
                            <div class="lablecontent">
                                <el-select
                                    @change="changeeditoraddhyfamybbs"
                                    v-model="editoraddhyfa.mybbs"
                                    style="width: 100%"
                                    clearable
                                    class="m-2 inputw"
                                    placeholder="请选择"
                                >
                                    <el-option
                                        v-for="item in editoraddmybbalist"
                                        :key="item.code"
                                        :label="item.name"
                                        :value="item.code"
                                    />
                                </el-select>
                            </div>
                        </div>
                        <div class="formboxitem">
                            <div class="lable">应用方案</div>
                            <div class="lablecontent">
                                <el-select
                                    v-model="editoraddhyfa.mybyyfa"
                                    style="width: 100%"
                                    clearable
                                    class="m-2 inputw"
                                    placeholder="请选择"
                                >
                                    <el-option
                                        v-for="item in editoraddmybfalist"
                                        :key="item.solutionCode"
                                        :label="item.solutionName"
                                        :value="item.solutionCode"
                                    />
                                </el-select>
                            </div>
                        </div>
                    </div>
                    <div class="formbox">
                        <div class="formboxitem">
                            <div class="lable">行业方案价格</div>
                            <div class="lablecontent">
                                <el-input
                                    :disabled="!isadd"
                                    v-model="editoraddhyfa.mybhyfajg"
                                    placeholder="请输入"
                                />
                            </div>
                        </div>
                        <div class="formboxitem" v-show="!isadd">
                            <div class="lable">方案状态</div>
                            <div class="lablecontent">
                                <el-select
                                    v-model="editoraddhyfa.mybfazt"
                                    style="width: 100%"
                                    clearable
                                    class="m-2 inputw"
                                    placeholder="请选择"
                                >
                                    <el-option
                                        :key="0"
                                        label="未启用"
                                        :value="0"
                                    />
                                    <el-option
                                        :key="1"
                                        label="已启用"
                                        :value="1"
                                    />
                                    <el-option
                                        :key="2"
                                        label="已禁用"
                                        :value="2"
                                    />
                                </el-select>
                            </div>
                        </div>
                    </div>
                    <div class="lable" style="padding: 0 11px">友情提示</div>
                    <div class="lablecontent" style="padding: 0 11px">
                        <el-input
                            v-model="editoraddhyfa.mybyqts"
                            placeholder="请输入"
                        />
                    </div>
                    <div class="lable" style="padding: 0 11px">特别约定</div>
                    <div class="lablecontent" style="padding: 0 11px">
                        <el-input
                            v-model="editoraddhyfa.mybtbyd"
                            placeholder="请输入"
                        />
                    </div>
                </div>
            </div>
            <template #footer>
                <div class="flexcenterbox">
                    <el-button
                        type="primary"
                        class="my_btn"
                        @click="addwesureindustryplanfn"
                        >通过</el-button
                    >
                </div>
            </template>
        </el-drawer>
        <!-- 修改保司保单号 -->
        <el-dialog v-model="editpolicytc" title="修改方案保单号" width="450px">
            <div class="editpolicytcbox">
                <div class="editpolicytcboxitem">
                    <div class="lable">保司编码</div>
                    <div class="lablecontent">
                        <el-input
                            disabled
                            v-model="editbsbdh.bsbm"
                            placeholder="请输入"
                        />
                    </div>
                </div>
                <div class="editpolicytcboxitem">
                    <div class="lable">方案名称</div>
                    <div class="lablecontent">
                        <el-input
                            disabled
                            v-model="editbsbdh.famc"
                            placeholder="请输入"
                        />
                    </div>
                </div>
                <div class="editpolicytcboxitem">
                    <div class="lable">方案编码</div>
                    <div class="lablecontent">
                        <el-input
                            disabled
                            v-model="editbsbdh.fabm"
                            placeholder="请输入"
                        />
                    </div>
                </div>
                <div class="editpolicytcboxitem">
                    <div class="lable"><span class="red">*</span>保单号</div>
                    <div class="lablecontent">
                        <el-input
                            v-model="editbsbdh.bdh"
                            placeholder="请输入"
                        />
                    </div>
                </div>
                <div class="editpolicytcboxitem">
                    <div class="lable"><span class="red">*</span>生效年月</div>
                    <div class="lablecontent">
                        <el-date-picker
                            style="width: 200px"
                            v-model="editbsbdh.sxny"
                            value-format="YYYY-MM"
                            type="month"
                            placeholder="请选择"
                        />
                    </div>
                </div>
            </div>
            <div class="flexcenterbox" style="margin-bottom: 20px">
                <el-button class="my_cancelbtn" @click="editpolicycancel"
                    >取消</el-button
                >
                <el-button class="my_btn" @click="editpolicysure"
                    >确定</el-button
                >
            </div>
        </el-dialog>
    </div>
</template>

<script setup lang="ts">
import crumbs from '../../components/crumbs.vue'
import {
    editpolicyapi,
    editindustryplanapi,
    getdayinsurejoblistapi,
    addwesureindustryplanapi,
    addinsurecompanyapi,
    insertpolicyapi,
    addorchangeSchemeapi,
    deleteSchemesapi,
    getpolicylistapi,
    getinsurComInsuranceCompanygetSchemeapi,
    delinsurComInsuranceCompanyapi,
    getinsurComInsuranceCompanylistapi,
    getquerymodifyindustryplanlistapi,
    changemodifyindustryplanpriceapi,
    getwesureindustryplanlistapi,
    addwesureindustryapi,
    changewesureindustryneweditapi,
    getwesureindustrylistapi,
    getwesureplandetailapi,
    getquerydailycompanysolutionapi,
    getquerydailyinsurancecompanyapi,
    getwesureplanlistapi
} from './dayinsuresetapi/dayinsuresetapi'
import { ref, reactive, computed, watch, onMounted, onActivated } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { shake } from '../../utils/utils'
import { ElMessage, ElMessageBox } from 'element-plus'
const router = useRouter()
const route = useRoute()
const isMobile = ref((window as any).isMobile)

onMounted(() => {
    getwesureplanlist()
    getquerydailyinsurancecompany()
})
onActivated(() => {
    getwesureplanlist()
    getquerydailyinsurancecompany()
})
const addhyfagltypelistvalue = ref<any>(0)
const addhyfaglgzlbvalue = ref<any>('')
const hyfaglbslxselectvalue = ref<any>('')

const hyglbslxlist = ref<any>([
    { label: '日日保', value: 0 },
    { label: '团意保', value: 1 },
    { label: '蚂蚁保', value: 2 }
])
const hyglbslxvalue = ref<any>('')
const hyglgzlbvalue = ref('')
const edithyglgzlbvalue = ref<any>('')
const hyglgzlblist = ref<any>([
    { label: '1类', value: 1 },
    { label: '2类', value: 2 },
    { label: '3类', value: 3 },
    { label: '4类', value: 4 },
    { label: '5类', value: 5 }
])
const hyglbslxselectvalue = ref<any>('')
const editbsbdh = reactive({
    sxny: '',
    bdh: '',
    fabm: '',
    famc: '',
    bsbm: '',
    id: 0
})

const editpolicysure = () => {
    editpolicyapi({
        id: editbsbdh.id,
        insureCompanyType: editbsbdh.bsbm,
        planName: editbsbdh.famc,
        planCode: editbsbdh.fabm,
        yearMonth: editbsbdh.sxny,
        policyNo: editbsbdh.bdh,
        isDelete: false,
        type: 1,
        updateTime: null
    }).then((res: any) => {
        console.log(res, '修改保单号')
        if (res.code === 200) {
            ElMessage({
                message: '修改成功',
                type: 'success'
            })
            getinsurComInsuranceCompanylist()
            editpolicycancel()
        }
    })
}
const editpolicycancel = () => {
    editpolicytc.value = false
    editbsbdh.id = 0
    editbsbdh.sxny = ''
    editbsbdh.bdh = ''
    editbsbdh.famc = ''
    editbsbdh.fabm = ''
    editbsbdh.bsbm = ''
}
const editpolicytcopen = (val: any) => {
    editpolicytc.value = true
    console.log(val, 'valvalvalval')
    editbsbdh.id = val.id
    editbsbdh.sxny = val.yearMonth
    editbsbdh.bdh = val.policyNo
    editbsbdh.famc = val.planName
    editbsbdh.fabm = val.planCode
    editbsbdh.bsbm = val.insureCompanyType
}

const changeaddhyfagltypelistvalue = (val: any) => {
    editoraddhyfa.hy = ''
    editoraddhylist.value = []
    getdayinsurejoblist(val)
}
const editpolicytc = ref(false)
const getdayinsurejoblist = (val: any) => {
    getdayinsurejoblistapi({
        isDelete: 0,
        pageSize: 100000,
        pageNum: 1,
        productType: val
    }).then((res: any) => {
        console.log(res, '行业')
        editoraddhylist.value = res.rows
    })
}
const editoraddhylist = ref<any>([])
const addwesureindustryplanfn = () => {
    let dayhyid: any = null
    let tyrbhyid: any = null
    let mybhyid: any = null
    let dayhycode: any = ''
    let tyrbhycode: any = ''
    let mybhycode: any = ''
    console.log(editoraddhylist.value, '1111111')
    editoraddhylist.value.forEach((ele: any, index: any) => {
        if (ele.industryName === editoraddhyfa.hy) {
            if (addhyfagltypelistvalue.value === 0) {
                dayhyid = ele.id
                dayhycode = ele.industryTypeCode
            } else if (addhyfagltypelistvalue.value === 1) {
                tyrbhyid = ele.id
                tyrbhycode = ele.industryTypeCode
            } else if (addhyfagltypelistvalue.value === 2) {
                mybhyid = ele.id
                mybhycode = ele.industryTypeCode
            }
            // ele.wesureIndustryList.forEach((item: any, i: any) => {
            //     console.log(item, 'item');
            //     if (item.productType === 0) {

            //     } else if (item.productType === 1) {
            //         tyrbhyid = item.id;
            //         tyrbhycode = item.industryTypeCode;
            //     }
            // });
        }
    })
    let dayyyfaname: any = ''
    let tyrbyyfaname: any = ''
    let mybyyfaname: any = ''
    let dayyyfaid: any = null
    let tyrbyyfaid: any = null
    let mybyyfaid: any = null
    if (addhyfagltypelistvalue.value === 0) {
        editoradddayfalist.value.forEach((ele: any, index: number) => {
            if (ele.solutionCode === editoraddhyfa.dayyyfa) {
                dayyyfaname = ele.solutionName
                dayyyfaid = ele.id
            }
        })
    } else if (addhyfagltypelistvalue.value === 1) {
        editoraddtyrbfalist.value.forEach((ele: any, index: number) => {
            if (ele.solutionCode === editoraddhyfa.tyrbyyfa) {
                tyrbyyfaname = ele.solutionName
                tyrbyyfaid = ele.id
            }
        })
    } else if (addhyfagltypelistvalue.value === 2) {
        editoraddmybfalist.value.forEach((ele: any, index: number) => {
            if (ele.solutionCode === editoraddhyfa.mybyyfa) {
                mybyyfaname = ele.solutionName
                mybyyfaid = ele.id
            }
        })
    }
    // editoraddtyrbfalist.value.forEach((ele: any, index: number) => {
    //     if (ele.solutionCode === editoraddhyfa.tyrbyyfa) {
    //         tyrbyyfaname = ele.solutionName;
    //         tyrbyyfaid = ele.id;
    //     }
    // });
    // console.log(editoraddhyfa.dayyyfa, 'calcalcal');
    // editoradddayfalist.value.forEach((ele: any, index: number) => {
    //     if (ele.solutionCode === editoraddhyfa.dayyyfa) {
    //         dayyyfaname = ele.solutionName;
    //         dayyyfaid = ele.id;
    //     }
    // });
    if (isadd.value) {
        if (addhyfagltypelistvalue.value === 0) {
            addwesureindustryplanapi({
                industryPlanName: editoraddhyfa.hyfamc,
                industryId: dayhyid === null ? '' : dayhyid,
                industryName: editoraddhyfa.hy,
                wesurePlanCode: editoraddhyfa.dayyyfa,
                wesurePlanName: dayyyfaname,
                price: editoraddhyfa.dayhyfajg,
                industryPlanTip: editoraddhyfa.dayyqts,
                industryPlanClause: editoraddhyfa.daytbyd,
                productType: 0,
                insureCompanyTypeOption: {},
                wesurePlan: {},
                insureCompanyType: editoraddhyfa.daybs,
                wesurePlanId: dayyyfaid === null ? '' : dayyyfaid,
                industryTypeCode: dayhycode
            }).then((res: any) => {
                console.log(res, '添加行业方案')
                if (res.code === 200) {
                    ElMessage({
                        message: '添加成功',
                        type: 'success'
                    })
                    getwesureindustryplanlist()
                    clear()
                    editoraddhyfatc.value = false
                }
            })
        } else if (addhyfagltypelistvalue.value === 1) {
            addwesureindustryplanapi({
                industryPlanName: editoraddhyfa.hyfamc,
                industryId: tyrbhyid === null ? '' : tyrbhyid,
                industryName: editoraddhyfa.hy,
                wesurePlanCode: editoraddhyfa.tyrbyyfa,
                wesurePlanName: tyrbyyfaname,
                price: editoraddhyfa.tyrbhyfajg,
                industryPlanTip: editoraddhyfa.tyrbyqts,
                industryPlanClause: editoraddhyfa.tyrbtbyd,
                productType: 1,
                insureCompanyTypeOption: {},
                wesurePlan: {},
                insureCompanyType: editoraddhyfa.tyrbbs,
                wesurePlanId: tyrbyyfaid === null ? '' : tyrbyyfaid,
                industryTypeCode: tyrbhycode
            }).then((res: any) => {
                console.log(res, '添加行业方案')
                if (res.code === 200) {
                    ElMessage({
                        message: '添加成功',
                        type: 'success'
                    })
                    getwesureindustryplanlist()
                    clear()
                    editoraddhyfatc.value = false
                }
            })
        } else if (addhyfagltypelistvalue.value === 2) {
            addwesureindustryplanapi({
                industryPlanName: editoraddhyfa.hyfamc,
                industryId: mybhyid === null ? '' : mybhyid,
                industryName: editoraddhyfa.hy,
                wesurePlanCode: editoraddhyfa.mybyyfa,
                wesurePlanName: mybyyfaname,
                price: editoraddhyfa.mybhyfajg,
                industryPlanTip: editoraddhyfa.mybyqts,
                industryPlanClause: editoraddhyfa.mybtbyd,
                productType: 2,
                insureCompanyTypeOption: {},
                wesurePlan: {},
                insureCompanyType: editoraddhyfa.mybbs,
                wesurePlanId: mybyyfaid === null ? '' : mybyyfaid,
                industryTypeCode: mybhycode,
                industryLevel: addhyfaglgzlbvalue.value
            }).then((res: any) => {
                console.log(res, '添加行业方案')
                if (res.code === 200) {
                    ElMessage({
                        message: '添加成功',
                        type: 'success'
                    })
                    getwesureindustryplanlist()
                    clear()
                    editoraddhyfatc.value = false
                }
            })
        }
        // if (editoraddhyfa.daybs === null || editoraddhyfa.daybs === '') {
        //     addwesureindustryplanapi([
        //         {
        //             industryPlanName: editoraddhyfa.hyfamc,
        //             industryId: tyrbhyid === null ? '' : tyrbhyid,
        //             industryName: editoraddhyfa.hy,
        //             wesurePlanCode: editoraddhyfa.tyrbyyfa,
        //             wesurePlanName: tyrbyyfaname,
        //             price: editoraddhyfa.tyrbhyfajg,
        //             industryPlanTip: editoraddhyfa.tyrbyqts,
        //             industryPlanClause: editoraddhyfa.tyrbtbyd,
        //             productType: 1,
        //             insureCompanyTypeOption: {},
        //             wesurePlan: {},
        //             insureCompanyType: editoraddhyfa.tyrbbs,
        //             wesurePlanId: tyrbyyfaid === null ? '' : tyrbyyfaid,
        //             industryTypeCode: tyrbhycode
        //         }
        //     ]).then((res: any) => {
        //         console.log(res, '添加行业方案');
        //         if (res.code === 200) {
        //             ElMessage({
        //                 message: '添加成功',
        //                 type: 'success'
        //             });
        //             getwesureindustryplanlist();
        //             clear();
        //             editoraddhyfatc.value = false;
        //         }
        //     });
        // } else if (
        //     editoraddhyfa.tyrbbs === null ||
        //     editoraddhyfa.tyrbbs === ''
        // ) {
        //     addwesureindustryplanapi([
        //         {
        //             industryPlanName: editoraddhyfa.hyfamc,
        //             industryId: dayhyid === null ? '' : dayhyid,
        //             industryName: editoraddhyfa.hy,
        //             wesurePlanCode: editoraddhyfa.dayyyfa,
        //             wesurePlanName: dayyyfaname,
        //             price: editoraddhyfa.dayhyfajg,
        //             industryPlanTip: editoraddhyfa.dayyqts,
        //             industryPlanClause: editoraddhyfa.daytbyd,
        //             productType: 0,
        //             insureCompanyTypeOption: {},
        //             wesurePlan: {},
        //             insureCompanyType: editoraddhyfa.daybs,
        //             wesurePlanId: dayyyfaid === null ? '' : dayyyfaid,
        //             industryTypeCode: dayhycode
        //         }
        //     ]).then((res: any) => {
        //         console.log(res, '添加行业方案');
        //         if (res.code === 200) {
        //             ElMessage({
        //                 message: '添加成功',
        //                 type: 'success'
        //             });
        //             getwesureindustryplanlist();
        //             clear();
        //             editoraddhyfatc.value = false;
        //         }
        //     });
        // } else {
        //     addwesureindustryplanapi([
        //         {
        //             industryPlanName: editoraddhyfa.hyfamc,
        //             industryId: dayhyid === null ? '' : dayhyid,
        //             industryName: editoraddhyfa.hy,
        //             wesurePlanCode: editoraddhyfa.dayyyfa,
        //             wesurePlanName: dayyyfaname,
        //             price: editoraddhyfa.dayhyfajg,
        //             industryPlanTip: editoraddhyfa.dayyqts,
        //             industryPlanClause: editoraddhyfa.daytbyd,
        //             productType: 0,
        //             insureCompanyTypeOption: {},
        //             wesurePlan: {},
        //             insureCompanyType: editoraddhyfa.daybs,
        //             wesurePlanId: dayyyfaid === null ? '' : dayyyfaid,
        //             industryTypeCode: dayhycode
        //         },
        //         {
        //             industryPlanName: editoraddhyfa.hyfamc,
        //             industryId: tyrbhyid === null ? '' : tyrbhyid,
        //             industryName: editoraddhyfa.hy,
        //             wesurePlanCode: editoraddhyfa.tyrbyyfa,
        //             wesurePlanName: tyrbyyfaname,
        //             price: editoraddhyfa.tyrbhyfajg,
        //             industryPlanTip: editoraddhyfa.tyrbyqts,
        //             industryPlanClause: editoraddhyfa.tyrbtbyd,
        //             productType: 1,
        //             insureCompanyTypeOption: {},
        //             wesurePlan: {},
        //             insureCompanyType: editoraddhyfa.tyrbbs,
        //             wesurePlanId: tyrbyyfaid === null ? '' : tyrbyyfaid,
        //             industryTypeCode: tyrbhycode
        //         }
        //     ]).then((res: any) => {
        //         console.log(res, '添加行业方案');
        //         if (res.code === 200) {
        //             ElMessage({
        //                 message: '添加成功',
        //                 type: 'success'
        //             });
        //             getwesureindustryplanlist();
        //             clear();
        //             editoraddhyfatc.value = false;
        //         }
        //     });
        // }
    } else if (!isadd.value) {
        if (addhyfagltypelistvalue.value === 0) {
            editindustryplanapi({
                isDelete: 0,
                id: dayindustryId.value,
                industryPlanName: editoraddhyfa.hyfamc,
                industryId: dayhyid === null ? '' : dayhyid,
                industryName: editoraddhyfa.hy,
                wesurePlanCode: editoraddhyfa.dayyyfa,
                wesurePlanName: dayyyfaname,
                price: editoraddhyfa.dayhyfajg,
                industryPlanTip: editoraddhyfa.dayyqts,
                industryPlanClause: editoraddhyfa.daytbyd,
                productType: 0,
                params: {},
                insureCompanyType: editoraddhyfa.daybs,
                wesurePlanId: dayyyfaid === null ? '' : dayyyfaid,
                industryTypeCode: dayhycode,
                state: editoraddhyfa.dayfazt
            }).then((res: any) => {
                console.log(res, '修改行业方案')
                if (res.code === 200) {
                    ElMessage({
                        message: '修改成功',
                        type: 'success'
                    })
                    getwesureindustryplanlist()
                    clear()
                    editoraddhyfatc.value = false
                }
            })
        } else if (addhyfagltypelistvalue.value === 1) {
            editindustryplanapi({
                isDelete: 0,
                id: tyrbindustryId.value,
                industryPlanName: editoraddhyfa.hyfamc,
                industryId: tyrbhyid === null ? '' : tyrbhyid,
                industryName: editoraddhyfa.hy,
                wesurePlanCode: editoraddhyfa.tyrbyyfa,
                wesurePlanName: tyrbyyfaname,
                price: editoraddhyfa.tyrbhyfajg,
                industryPlanTip: editoraddhyfa.tyrbyqts,
                industryPlanClause: editoraddhyfa.tyrbtbyd,
                productType: 1,
                params: {},
                insureCompanyType: editoraddhyfa.tyrbbs,
                wesurePlanId: tyrbyyfaid === null ? '' : tyrbyyfaid,
                industryTypeCode: tyrbhycode,
                state: editoraddhyfa.tyrbfazt
            }).then((res: any) => {
                console.log(res, '修改行业方案')
                if (res.code === 200) {
                    ElMessage({
                        message: '修改成功',
                        type: 'success'
                    })
                    getwesureindustryplanlist()
                    clear()
                    editoraddhyfatc.value = false
                }
            })
        } else if (addhyfagltypelistvalue.value === 2) {
            editindustryplanapi({
                isDelete: 0,
                id: mybindustryId.value,
                industryPlanName: editoraddhyfa.hyfamc,
                industryId: mybhyid === null ? '' : mybhyid,
                industryName: editoraddhyfa.hy,
                wesurePlanCode: editoraddhyfa.mybyyfa,
                wesurePlanName: mybyyfaname,
                price: editoraddhyfa.mybhyfajg,
                industryPlanTip: editoraddhyfa.mybyqts,
                industryPlanClause: editoraddhyfa.mybtbyd,
                productType: 2,
                params: {},
                insureCompanyType: editoraddhyfa.mybbs,
                wesurePlanId: mybyyfaid === null ? '' : mybyyfaid,
                industryTypeCode: mybhycode,
                state: editoraddhyfa.mybfazt,
                industryLevel: addhyfaglgzlbvalue.value
            }).then((res: any) => {
                console.log(res, '修改行业方案')
                if (res.code === 200) {
                    ElMessage({
                        message: '修改成功',
                        type: 'success'
                    })
                    getwesureindustryplanlist()
                    clear()
                    editoraddhyfatc.value = false
                }
            })
        }
        // if (editoraddhyfa.daybs === null || editoraddhyfa.daybs === '') {
        //     editindustryplanapi([
        //         {`
        //             isDelete: 0,
        //             id: tyrbindustryId.value,
        //             industryPlanName: editoraddhyfa.hyfamc,
        //             industryId: tyrbhyid === null ? '' : tyrbhyid,
        //             industryName: editoraddhyfa.hy,
        //             wesurePlanCode: editoraddhyfa.tyrbyyfa,
        //             wesurePlanName: tyrbyyfaname,
        //             price: editoraddhyfa.tyrbhyfajg,
        //             industryPlanTip: editoraddhyfa.tyrbyqts,
        //             industryPlanClause: editoraddhyfa.tyrbtbyd,
        //             productType: 1,
        //             params: {},
        //             insureCompanyType: editoraddhyfa.tyrbbs,
        //             wesurePlanId: tyrbyyfaid === null ? '' : tyrbyyfaid,
        //             industryTypeCode: tyrbhycode,
        //             state: editoraddhyfa.tyrbfazt
        //         }
        //     ]).then((res: any) => {
        //         console.log(res, '修改行业方案');
        //         if (res.code === 200) {
        //             ElMessage({
        //                 message: '修改成功',
        //                 type: 'success'
        //             });
        //             getwesureindustryplanlist();
        //             clear();
        //             editoraddhyfatc.value = false;
        //         }
        //     });
        // } else if (
        //     editoraddhyfa.tyrbbs === null ||
        //     editoraddhyfa.tyrbbs === ''
        // ) {
        //     editindustryplanapi([
        //         {
        //             isDelete: 0,
        //             id: dayindustryId.value,
        //             industryPlanName: editoraddhyfa.hyfamc,
        //             industryId: dayhyid === null ? '' : dayhyid,
        //             industryName: editoraddhyfa.hy,
        //             wesurePlanCode: editoraddhyfa.dayyyfa,
        //             wesurePlanName: dayyyfaname,
        //             price: editoraddhyfa.dayhyfajg,
        //             industryPlanTip: editoraddhyfa.dayyqts,
        //             industryPlanClause: editoraddhyfa.daytbyd,
        //             productType: 0,
        //             params: {},
        //             insureCompanyType: editoraddhyfa.daybs,
        //             wesurePlanId: dayyyfaid === null ? '' : dayyyfaid,
        //             industryTypeCode: dayhycode,
        //             state: editoraddhyfa.dayfazt
        //         }
        //     ]).then((res: any) => {
        //         console.log(res, '修改行业方案');
        //         if (res.code === 200) {
        //             ElMessage({
        //                 message: '修改成功',
        //                 type: 'success'
        //             });
        //             getwesureindustryplanlist();
        //             clear();
        //             editoraddhyfatc.value = false;
        //         }
        //     });
        // } else {
        //     editindustryplanapi([
        //         {
        //             isDelete: 0,
        //             id: dayindustryId.value,
        //             industryPlanName: editoraddhyfa.hyfamc,
        //             industryId: dayhyid === null ? '' : dayhyid,
        //             industryName: editoraddhyfa.hy,
        //             wesurePlanCode: editoraddhyfa.dayyyfa,
        //             wesurePlanName: dayyyfaname,
        //             price: editoraddhyfa.dayhyfajg,
        //             industryPlanTip: editoraddhyfa.dayyqts,
        //             industryPlanClause: editoraddhyfa.daytbyd,
        //             productType: 0,
        //             params: {},
        //             insureCompanyType: editoraddhyfa.daybs,
        //             wesurePlanId: dayyyfaid === null ? '' : dayyyfaid,
        //             industryTypeCode: dayhycode,
        //             state: editoraddhyfa.dayfazt
        //         },
        //         {
        //             isDelete: 0,
        //             id: tyrbindustryId.value,
        //             industryPlanName: editoraddhyfa.hyfamc,
        //             industryId: tyrbhyid === null ? '' : tyrbhyid,
        //             industryName: editoraddhyfa.hy,
        //             wesurePlanCode: editoraddhyfa.tyrbyyfa,
        //             wesurePlanName: tyrbyyfaname,
        //             price: editoraddhyfa.tyrbhyfajg,
        //             industryPlanTip: editoraddhyfa.tyrbyqts,
        //             industryPlanClause: editoraddhyfa.tyrbtbyd,
        //             productType: 1,
        //             params: {},
        //             insureCompanyType: editoraddhyfa.tyrbbs,
        //             wesurePlanId: tyrbyyfaid === null ? '' : tyrbyyfaid,
        //             industryTypeCode: tyrbhycode,
        //             state: editoraddhyfa.tyrbfazt
        //         }
        //     ]).then((res: any) => {
        //         console.log(res, '修改行业方案');
        //         if (res.code === 200) {
        //             ElMessage({
        //                 message: '修改成功',
        //                 type: 'success'
        //             });
        //             getwesureindustryplanlist();
        //             clear();
        //             editoraddhyfatc.value = false;
        //         }
        //     });
        // }
    }
}
const changeeditoraddhyfamybbs = (val: any) => {
    editoraddhyfa.tyrbyyfa = ''
    getinsurComInsuranceCompanygetSchemeapi({
        code: val,
        pageSize: 9999,
        pageNum: 1
    }).then((res: any) => {
        console.log(res)
        editoraddmybfalist.value = res.rows
    })
}
const changeeditoraddhyfatyrbbs = (val: any) => {
    editoraddhyfa.tyrbyyfa = ''
    getinsurComInsuranceCompanygetSchemeapi({
        code: val,
        pageSize: 9999,
        pageNum: 1
    }).then((res: any) => {
        console.log(res)
        editoraddtyrbfalist.value = res.rows
    })
}
const changeeditoraddhyfadaybs = (val: any) => {
    editoraddhyfa.dayyyfa = ''
    getinsurComInsuranceCompanygetSchemeapi({
        code: val,
        pageSize: 9999,
        pageNum: 1
    }).then((res: any) => {
        console.log(res)
        editoradddayfalist.value = res.rows
    })
}
const editoradddayfalist = ref<any>([])
const editoraddtyrbfalist = ref<any>([])
const editoraddmybfalist = ref<any>([])
const editoraddhyfa = reactive({
    tyrbtbyd: '',
    tyrbyqts: '',
    tyrbhyfajg: '',
    tyrbyyfa: '',
    tyrbbs: '',
    mybtbyd: '',
    mybyqts: '',
    mybhyfajg: '',
    mybyyfa: '',
    mybbs: '',
    mybfazt: '',
    daytbyd: '',
    dayyqts: '',
    dayhyfajg: '',
    dayyyfa: '',
    daybs: '',
    hy: '',
    hyfamc: '',
    tyrbfazt: '',
    dayfazt: ''
})
const clear = () => {
    editoraddhyfa.tyrbtbyd = ''
    editoraddhyfa.tyrbyqts = ''
    editoraddhyfa.tyrbhyfajg = ''
    editoraddhyfa.tyrbyyfa = ''
    editoraddhyfa.tyrbbs = ''
    editoraddhyfa.mybtbyd = ''
    editoraddhyfa.mybyqts = ''
    editoraddhyfa.mybhyfajg = ''
    editoraddhyfa.mybyyfa = ''
    editoraddhyfa.mybbs = ''
    editoraddhyfa.daytbyd = ''
    editoraddhyfa.dayyqts = ''
    editoraddhyfa.dayhyfajg = ''
    editoraddhyfa.dayyyfa = ''
    editoraddhyfa.daybs = ''
    editoraddhyfa.hy = ''
    editoraddhyfa.hyfamc = ''
    editoraddhyfa.dayfazt = ''
    editoraddhyfa.tyrbfazt = ''
    editoraddhyfa.mybfazt = ''
    addhyfaglgzlbvalue.value = ''
}
const isadd = ref(false)
const ceditoraddhyfatcopen = () => {
    getdayinsurejoblist(0)
    isadd.value = true
    editoraddhyfatc.value = true
    clear()
    getinsurComInsuranceCompanylistapi({
        type: 1
    }).then((res: any) => {
        console.log(res.rows, '日日保保司')
        editoradddaybalist.value = res.rows
    })
    getinsurComInsuranceCompanylistapi({
        type: 3
    }).then((res: any) => {
        console.log(res.rows, '团意保保司')
        editoraddtyrbbalist.value = res.rows
    })
    getinsurComInsuranceCompanylistapi({
        type: 4
    }).then((res: any) => {
        console.log(res.rows, '蚂蚁保保司')
        editoraddmybbalist.value = res.rows
    })
}
const dayindustryId = ref(0)
const tyrbindustryId = ref(0)
const mybindustryId = ref(0)
const editoraddhyfatcopen = (val: any) => {
    getdayinsurejoblist(val.productType)
    isadd.value = false
    console.log(val, 'valvalvla')
    addhyfagltypelistvalue.value = val.productType
    tyrbindustryId.value = val.id
    dayindustryId.value = val.id
    mybindustryId.value = val.id
    // val.wesureIndustryPlanList.forEach((ele: any, i: number) => {
    //     if (ele.productType === 0) {
    //         dayindustryId.value = ele.industryId
    //     } else if (ele.productType === 1) {
    //         tyrbindustryId.value = ele.industryId
    //     }
    // })dangqian  editoraddhyfa.daybs
    editoraddhyfa.hy = val.industryName
    editoraddhyfa.hyfamc = val.industryPlanName
    if (val.productType === 0) {
        editoraddhyfa.daytbyd = val.industryPlanClause
        editoraddhyfa.dayyqts = val.industryPlanTip
        editoraddhyfa.dayhyfajg = val.price
        editoraddhyfa.daybs = val.insureCompanyType
        editoraddhyfa.dayfazt = val.state
        getinsurComInsuranceCompanygetSchemeapi({
            code: val.insureCompanyType,
            pageSize: 9999,
            pageNum: 1
        }).then((res: any) => {
            console.log(res)
            editoradddayfalist.value = res.rows
            editoraddhyfa.dayyyfa = val.wesurePlanCode
        })
    } else if (val.productType === 1) {
        editoraddhyfa.tyrbfazt = val.state
        editoraddhyfa.tyrbtbyd = val.industryPlanClause
        editoraddhyfa.tyrbyqts = val.industryPlanTip
        editoraddhyfa.tyrbhyfajg = val.price
        editoraddhyfa.tyrbbs = val.insureCompanyType
        getinsurComInsuranceCompanygetSchemeapi({
            code: val.insureCompanyType,
            pageSize: 9999,
            pageNum: 1
        }).then((res: any) => {
            console.log(res)
            editoraddtyrbfalist.value = res.rows
            editoraddhyfa.tyrbyyfa = val.wesurePlanCode
        })
    } else if (val.productType === 2) {
        editoraddhyfa.mybfazt = val.state
        editoraddhyfa.mybtbyd = val.industryPlanClause
        editoraddhyfa.mybyqts = val.industryPlanTip
        editoraddhyfa.mybhyfajg = val.price
        editoraddhyfa.mybbs = val.insureCompanyType
        getinsurComInsuranceCompanygetSchemeapi({
            code: val.insureCompanyType,
            pageSize: 9999,
            pageNum: 1
        }).then((res: any) => {
            console.log(res)
            editoraddmybfalist.value = res.rows
            editoraddhyfa.mybyyfa = val.wesurePlanCode
        })
    }
    // if (val.wesureIndustryPlanList) {
    //     val.wesureIndustryPlanList.forEach((ele: any, index: any) => {
    //         if (ele.productType === 0) {
    //             editoraddhyfa.daytbyd = ele.industryPlanClause;
    //             editoraddhyfa.dayyqts = ele.industryPlanTip;
    //             editoraddhyfa.dayhyfajg = ele.price;
    //             editoraddhyfa.daybs = ele.insureCompanyType;
    //             editoraddhyfa.dayfazt = ele.state;
    //             getinsurComInsuranceCompanygetSchemeapi({
    //                 code: ele.insureCompanyType,
    //                 pageSize: 9999,
    //                 pageNum: 1
    //             }).then((res: any) => {
    //                 console.log(res);
    //                 editoradddayfalist.value = res.rows;
    //                 editoraddhyfa.dayyyfa = ele.wesurePlanCode;
    //             });
    //         } else {
    //             editoraddhyfa.tyrbfazt = ele.state;
    //             editoraddhyfa.tyrbtbyd = ele.industryPlanClause;
    //             editoraddhyfa.tyrbyqts = ele.industryPlanTip;
    //             editoraddhyfa.tyrbhyfajg = ele.price;
    //             editoraddhyfa.tyrbbs = ele.insureCompanyType;
    //             getinsurComInsuranceCompanygetSchemeapi({
    //                 code: ele.insureCompanyType,
    //                 pageSize: 9999,
    //                 pageNum: 1
    //             }).then((res: any) => {
    //                 console.log(res);
    //                 editoraddtyrbfalist.value = res.rows;
    //                 editoraddhyfa.tyrbyyfa = ele.wesurePlanCode;
    //             });
    //         }
    //     });
    // } else {
    //     editoraddhyfa.tyrbtbyd = '';
    //     editoraddhyfa.tyrbyqts = '';
    //     editoraddhyfa.tyrbhyfajg = '';
    //     editoraddhyfa.tyrbyyfa = '';
    //     editoraddhyfa.tyrbbs = '';
    //     editoraddhyfa.daytbyd = '';
    //     editoraddhyfa.dayyqts = '';
    //     editoraddhyfa.dayhyfajg = '';
    //     editoraddhyfa.dayyyfa = '';
    //     editoraddhyfa.daybs = '';
    // }

    getinsurComInsuranceCompanylistapi({
        type: 1
    }).then((res: any) => {
        console.log(res.rows, '日日保保司')
        editoradddaybalist.value = res.rows
    })
    getinsurComInsuranceCompanylistapi({
        type: 3
    }).then((res: any) => {
        console.log(res.rows, '团意保保司')
        editoraddtyrbbalist.value = res.rows
    })
    getinsurComInsuranceCompanylistapi({
        type: 4
    }).then((res: any) => {
        console.log(res.rows, '蚂蚁保保司')
        editoraddmybbalist.value = res.rows
    })
    editoraddhyfatc.value = true
}
const editoradddaybalist = ref<any>([])
const editoraddtyrbbalist = ref<any>([])
const editoraddmybbalist = ref<any>([])
const editoraddhyfatc = ref(false)
const addbsfabm = ref('')
const addbsmc = ref('')
const addbscancel = () => {
    bullpayuploadRef.value.clearFiles()
    bullpayselectedImage.value = null
    addbsfabm.value = ''
    addbsmc.value = ''
    tjbsfatc.value = false
}
const addbssure = () => {
    addinsurecompanyapi({
        code: addbsfabm.value,
        name: addbsmc.value,
        invalidLogo: null,
        type: 1,
        logo: bullpayselectedImage.value.split(',')[1]
    }).then((res: any) => {
        console.log(res)
        if (res) {
            ElMessage({
                message: '添加成功',
                type: 'success'
            })
            addbscancel()
            getinsurComInsuranceCompanylist()
        }
    })
}
const bullpayuploadRef = ref()
const bullpayfileList = ref([])
const bullpayonChange = (file: any, fileListVal: any) => {
    console.log(file)
    const reader = new FileReader()
    reader.onload = (event: any) => {
        const url = event.target.result
        console.log(url)
        bullpayselectedImage.value = url
    }
    reader.readAsDataURL(file.raw)
    bullpayfileList.value = fileListVal
}
const bullpayselectedImage = ref<any>(null)
const tjbsfatcopen = () => {
    tjbsfatc.value = true
}
const tjbsfatc = ref(false)
const plsetbdhtcopen = () => {
    plsetbdhtc.value = true
    getinsurComInsuranceCompanygetSchemeapi({
        code: bsbm.value
    }).then((res: any) => {
        console.log(res, '保司方案')
        cgetinsurComInsuranceCompanygetSchemetabledate.value = res.rows
        cgetinsurComInsuranceCompanygetSchemetabledate.value.forEach(
            (ele: any, index: any) => {
                ele.policyNo = ''
            }
        )
    })
}
const sureadd = () => {
    const arr: any = []
    cgetinsurComInsuranceCompanygetSchemetabledate.value.forEach(
        (ele: any, index: any) => {
            if (ele.policyNo) {
                arr.push(
                    `${ele.solutionCode}///${ele.policyNo}///${ele.solutionName}`
                )
            }
        }
    )
    insertpolicyapi({
        insureCompanyType: bsbm.value,
        type: 0,
        yearMonth: sxny.value,
        policyNos: arr
    }).then((res: any) => {
        console.log(res, '批量设置')
        if (res.code === 200) {
            ElMessage({
                message: '添加成功',
                type: 'success'
            })
            plsetbdhtc.value = false
            getinsurComInsuranceCompanylist()
        }
    })
}
const sxny = ref('')
const bsbm = ref('')
const plsetbdhtc = ref(false)
const changebsglfaje = (val: any) => {
    if (val === '30W') {
        bsglfamc.value = bsglfalbname.value + '30万'
    } else if (val === '50W') {
        bsglfamc.value = bsglfalbname.value + '50万'
    } else if (val === '80W') {
        bsglfamc.value = bsglfalbname.value + '80万'
    } else if (val === '100W') {
        bsglfamc.value = bsglfalbname.value + '100万'
    } else if (val === '120W') {
        bsglfamc.value = bsglfalbname.value + '120万'
    }
}
const sure = () => {
    console.log(isaddinsureplanactiveflag.value)
    if (isaddinsureplanactiveflag.value === true) {
        if (!bsglautosc.value) {
            addorchangeSchemeapi({
                schemeName: bsglfamc.value,
                price: bsglfaje.value,
                isSysgen: bsglautosc.value,
                code: code.value,
                name: bsglfalbname.value,
                invalidLogoFileId: null,
                insureMode: null,
                solutionCode: bsglfabm.value,
                invalidLogo: null,
                type: 1,
                types: null,
                createTime: null,
                createUserId: null
            }).then((res: any) => {
                console.log(res)
                if (res.code === 200) {
                    ElMessage({
                        message: '添加成功',
                        type: 'success'
                    })
                    calcel()
                    getbsglfllist()
                }
            })
        } else if (bsglautosc.value) {
            addorchangeSchemeapi({
                schemeName: bsglfamc.value,
                price: bsglfaje.value,
                isSysgen: bsglautosc.value,
                code: code.value,
                name: bsglfalbname.value,
                invalidLogoFileId: null,
                insureMode: null,
                invalidLogo: null,
                type: 1,
                types: null,
                createTime: null,
                createUserId: null
            }).then((res: any) => {
                console.log(res)
                if (res.code === 200) {
                    ElMessage({
                        message: '添加成功',
                        type: 'success'
                    })
                    calcel()
                    getbsglfllist()
                }
            })
        }
    } else if (!isaddinsureplanactiveflag.value) {
        if (!bsglautosc.value) {
            addorchangeSchemeapi({
                id: changeid.value,
                schemeName: bsglfamc.value,
                price: bsglfaje.value,
                isSysgen: bsglautosc.value,
                code: code.value,
                name: bsglfalbname.value,
                invalidLogoFileId: null,
                insureMode: null,
                logo: logo.value,
                logoFileId: logoFileId.value,
                solutionCode: bsglfabm.value,
                invalidLogo: null,
                type: 1,
                types: null,
                createTime: null,
                createUserId: null
            }).then((res: any) => {
                console.log(res)
                if (res.code === 200) {
                    ElMessage({
                        message: '修改成功',
                        type: 'success'
                    })
                    calcel()
                    getbsglfllist()
                }
            })
        } else if (bsglautosc.value) {
            addorchangeSchemeapi({
                id: changeid.value,
                schemeName: bsglfamc.value,
                price: bsglfaje.value,
                isSysgen: bsglautosc.value,
                code: code.value,
                logo: logo.value,
                logoFileId: logoFileId.value,
                name: bsglfalbname.value,
                invalidLogoFileId: null,
                insureMode: null,
                invalidLogo: null,
                type: 1,
                types: null,
                createTime: null,
                createUserId: null
            }).then((res: any) => {
                console.log(res)
                if (res.code === 200) {
                    ElMessage({
                        message: '修改成功',
                        type: 'success'
                    })
                    calcel()
                    getbsglfllist()
                }
            })
        }
    }
}
const code = ref('')
const logo = ref('')
const logoFileId = ref(0)
const deleteSchemesfn = (val: any) => {
    console.log(val)
    ElMessageBox.confirm('确定删除该方案吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
    })
        .then(() => {
            deleteSchemesapi(val.id).then((res: any) => {
                console.log(res, '删除保司')
                if (res.code === 200) {
                    ElMessage({
                        type: 'success',
                        message: '删除成功'
                    })
                    getbsglfllist()
                }
            })
        })
        .catch(() => {
            ElMessage({
                type: 'info',
                message: '取消删除'
            })
        })
}
const calcel = () => {
    bsglfamc.value = bsglfalbname.value
    bsglfaje.value = ''
    bsglautosc.value = true
    bsglfabm.value = ''
    showbsglfabm.value = false
    isaddinsureplanactiveflag.value = true
}
const changeid = ref(0)
const changebsglfalb = (ele: any) => {
    console.log(ele, 'elelel')
    changeid.value = ele.id
    isaddinsureplanactiveflag.value = false
    bsglfamc.value = ele.solutionName
}
const changebsglautosc = (val: any) => {
    bsglfabm.value = ''
    console.log(val)
    if (val) {
        showbsglfabm.value = false
    } else {
        showbsglfabm.value = true
    }
}
const showbsglfabm = ref(false)
const bsglfabm = ref('')
const bsglautosc = ref(true)
const bsglfaje = ref('')
const bsglfamc = ref('')
const isaddinsureplanactiveflag = ref(true)
const getbsglfllist = () => {
    getinsurComInsuranceCompanygetSchemeapi({
        code: bsglfllistcode.value,
        pageNum: bsglfllistpagenum.value,
        pageSize: bsglfllistpagesize.value
    }).then((res: any) => {
        console.log(res, '保司方案')
        bsglfllisttotal.value = res.total
        bsglfllisttabledate.value = res.rows
    })
}
const bsglfllistpagesize = ref(10)
const bsglfllistpagenum = ref(1)
const changebsglfllistpagesize = (val: any) => {
    bsglfllistpagesize.value = val
    bsglfllistpagenum.value = 1
    getbsglfllist()
}
const changebsglfllistpagenum = (val: any) => {
    bsglfllistpagenum.value = val
    getbsglfllist()
}
const bsglfllisttotal = ref(10)
const bsglfllistcode = ref('')
const bsglfllisttabledate = ref<any>([])
const bsglfalbname = ref('')
const bsglfalbtcopen = (ele: any) => {
    code.value = ele.code
    logo.value = ele.logo
    logoFileId.value = ele.logoFileId
    bsglfamc.value = ele.name
    bsglfalbname.value = ele.name
    showbsglfabm.value = false
    bsglautosc.value = true
    bsglfalbtc.value = true
    console.log(ele, 'elelelelele')
    bsglfllistcode.value = ele.code
    getbsglfllist()
}
const bsglfalbtc = ref(false)
const changegetinsurComInsuranceCompanygetSchemepagenum = (val: number) => {
    getinsurComInsuranceCompanygetSchemepagenum.value = val
    getinsurComInsuranceCompanygetScheme()
}
const changegetinsurComInsuranceCompanygetSchemepagesize = (val: number) => {
    getinsurComInsuranceCompanygetSchemepagesize.value = val
    getinsurComInsuranceCompanygetSchemepagenum.value = 1
    getinsurComInsuranceCompanygetScheme()
}
const getinsurComInsuranceCompanygetScheme = () => {
    getpolicylistapi({
        pageNum: getinsurComInsuranceCompanygetSchemepagenum.value,
        pageSize: getinsurComInsuranceCompanygetSchemepagesize.value,
        insureCompanyType: getinsurComInsuranceCompanygetSchemecode.value,
        isDelete: false,
        yearMonth: bsbdhdate.value
    }).then((res: any) => {
        console.log(res, '查询保司方案保单号')
        getinsurComInsuranceCompanygetSchemetotal.value = res.total
        getinsurComInsuranceCompanygetSchemetabledate.value = res.rows
    })
}
const bsbdhdate = ref('')
const getinsurComInsuranceCompanygetSchemepagenum = ref(1)
const getinsurComInsuranceCompanygetSchemepagesize = ref(10)
const getinsurComInsuranceCompanygetSchemetotal = ref(10)
const getinsurComInsuranceCompanygetSchemecode = ref('')
const getinsurComInsuranceCompanygetSchemetabledate = ref<any>([])
const cgetinsurComInsuranceCompanygetSchemetabledate = ref<any>([])
const delinsurComInsuranceCompanyfn = (id: any) => {
    ElMessageBox.confirm('确定删除该保司吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
    })
        .then(() => {
            delinsurComInsuranceCompanyapi(id).then((res: any) => {
                console.log(res, '删除保司')
                if (res.code === 200) {
                    ElMessage({
                        type: 'success',
                        message: '删除成功'
                    })
                }
            })
        })
        .catch(() => {
            ElMessage({
                type: 'info',
                message: '取消删除'
            })
        })
}
const getinsurComInsuranceCompanylist = () => {
    getinsurComInsuranceCompanylistapi({
        types: '1,3'
    }).then((res: any) => {
        console.log(res, '查询保司管理列表')
        bslist.value = res.rows
        console.log(res.rows[insurecompanyflag.value], 'dadada')
        getinsurComInsuranceCompanygetSchemecode.value =
            res.rows[insurecompanyflag.value].code
        getinsurComInsuranceCompanygetScheme()
    })
}
const bslist = ref<any>([])
const getquerymodifyindustryplanlist = () => {
    getquerymodifyindustryplanlistapi({
        id: hygjjlid.value
    }).then((res: any) => {
        console.log(res, '改嫁记录')
        // hygjjltotal.value = res.total
        hyfagjjltabledate.value = res.rows
    })
}
const hygjjlid = ref(0)
const hyfagjjltabledate = ref<any>([])
const hygjjltotal = ref(0)
const hygjjlpagesize = ref(10)
const hygjjlpagenum = ref(0)
const changehygjjlpagesize = (val: any) => {
    hygjjlpagesize.value = val
    hygjjlpagenum.value = 1
    getquerymodifyindustryplanlist()
}
const changehygjjlpagenum = (val: any) => {
    hygjjlpagenum.value = val
    getquerymodifyindustryplanlist()
}
const hyfagjjltcopen = (val: any) => {
    hygjjlid.value = val.id
    getquerymodifyindustryplanlist()
    hyfagjjltc.value = true
}
const hyfagjjltc = ref(false)
const hyfaxgjgok = () => {
    changemodifyindustryplanpriceapi({
        id: hyfagjid.value,
        effectDay: hyfagjdate.value,
        price: hyfagjjg.value,
        newPrice: hyfagjnewjg.value,
        industryPlanName: hyfagjhyfamc.value,
        wesurePlanName: hyfagjbxfamc.value,
        unit: hyfagjdw.value
    }).then((res: any) => {
        console.log(res, '修改价格')
        if (res === true) {
            ElMessage({
                message: '修改成功',
                type: 'success'
            })
            getwesureindustryplanlist()
            hyfachangepricetc.value = false
        }
    })
}
const hyfagjdate = ref('')
const hyfagjnewjg = ref('')
const hyfagjjg = ref('')
const hyfagjdw = ref('')
const hyfagjbxfamc = ref('')
const hyfagjhyfamc = ref('')
const hyfachangepricetc = ref(false)
const hyfagjid = ref(0)
const hyfachangeprice = (val: any) => {
    hyfachangepricetc.value = true
    console.log(val, 'valvalvalvalval')
    hyfagjid.value = val.id
    hyfagjjg.value = val.price
    hyfagjdw.value = val.unit
    hyfagjhyfamc.value = val.industryPlanName
    hyfagjbxfamc.value = val.wesurePlanName
    hyfagjdate.value = ''
    hyfagjnewjg.value = ''
}
const changehyfapagesize = (val: number) => {
    hyfapagesize.value = val
    hyfapagenum.value = 1
    getwesureindustryplanlist()
}
const changehyfapagenum = (val: number) => {
    hyfapagenum.value = val
    getwesureindustryplanlist()
}
const changehyfamc = () => {
    shake(getwesureindustryplanlist, 400)
}
const changehyfaname = () => {
    shake(getwesureindustryplanlist, 400)
}
const getwesureindustryplanlist = () => {
    getwesureindustryplanlistapi({
        pageNum: hyfapagenum.value,
        pageSize: hyfapagesize.value,
        industryPlanName: hyfamc.value,
        industryName: hyfaname.value,
        state: hyfastatus.value,
        productType: hyfaglbslxselectvalue.value
    }).then((res: any) => {
        console.log(res, '查询行业方案列表')
        hyfatabledate.value = res.rows
        hyfatotal.value = res.total
    })
}
const clearhyfaform = () => {
    hyfamc.value = ''
    hyfaname.value = ''
    hyfastatus.value = ''
}
const hyfapagenum = ref(1)
const hyfapagesize = ref(10)
const hyfatotal = ref(1)
const hyfamc = ref('')
const hyfaname = ref('')
const hyfastatus = ref('')
const hyfatabledate = ref<any>([])

const addhytcopen = () => {
    addhytc.value = true
    addhydaycode.value = ''
    addhyname.value = ''
    addhycode.value = ''
    hyglgzlbvalue.value = ''
    hyglbslxvalue.value = ''
}
const edithysure = () => {
    if (edithyname.value === '') {
        ElMessage({
            message: '请输入行业名称',
            type: 'warning'
        })
        return
    }
    if (edithyname.value === '') {
        ElMessage({
            message: '请输入行业名称',
            type: 'warning'
        })
        return
    }
    let obj = {}
    if (edithttype.value === 2) {
        obj = {
            id: edithyid.value,
            industryName: edithyname.value,
            industryTypeCode: edithycode.value,
            industryLevel: edithyglgzlbvalue.value
        }
    } else {
        obj = {
            id: edithyid.value,
            industryName: edithyname.value,
            industryTypeCode: edithycode.value
        }
    }
    changewesureindustryneweditapi(obj).then((res: any) => {
        console.log(res, '修改行业')
        if (res.code === 200) {
            getwesureindustrylist()
            edithytc.value = false
            ElMessage({
                message: '修改成功',
                type: 'success'
            })
        }
    })
    // if (editflag.value === 2) {
    //     changewesureindustryneweditapi([
    //         {
    //             id: edittyrbhyid.value,
    //             industryName: edithyname.value,
    //             industryTypeCode: edithytyrbcode.value,
    //             productType: 1
    //         }
    //     ]).then((res: any) => {
    //         console.log(res, '修改行业')
    //         if (res.code === 200) {
    //             edithytc.value = false
    //             ElMessage({
    //                 message: "修改成功",
    //                 type: "success"
    //             })
    //         }
    //     })
    // } else if (editflag.value === 1) {
    //     console.log('okok');
    //     changewesureindustryneweditapi([{
    //         id: editdayhyid.value,
    //         industryName: edithyname.value,
    //         industryTypeCode: edithydaycode.value,
    //         productType: 0
    //     }
    //     ]).then((res: any) => {
    //         console.log(res, '修改行业')
    //         if (res.code === 200) {
    //             edithytc.value = false
    //             ElMessage({
    //                 message: "修改成功",
    //                 type: "success"
    //             })
    //         }
    //     })
    // } else if (editflag.value === 3) {
    //     changewesureindustryneweditapi([{
    //         id: editdayhyid.value,
    //         industryName: edithyname.value,
    //         industryTypeCode: edithydaycode.value,
    //         productType: 0
    //     },
    //     {
    //         id: edittyrbhyid.value,
    //         industryName: edithyname.value,
    //         industryTypeCode: edithytyrbcode.value,
    //         productType: 1
    //     }
    //     ]).then((res: any) => {
    //         console.log(res, '修改行业')
    //         if (res.code === 200) {
    //             edithytc.value = false
    //             ElMessage({
    //                 message: "修改成功",
    //                 type: "success"
    //             })
    //         }
    //     })
    // }
}
const addhysure = () => {
    if (hyglbslxvalue.value === '') {
        ElMessage({
            message: '请选择保司类型',
            type: 'warning'
        })
        return
    }
    if (addhyname.value === '') {
        ElMessage({
            message: '请输入行业名称',
            type: 'warning'
        })
        return
    }
    let obj = {}
    if (hyglbslxvalue.value === 2) {
        if (hyglgzlbvalue.value === '') {
            ElMessage({
                message: '请输入工种等级',
                type: 'warning'
            })
            return
        }
        obj = {
            industryName: addhyname.value,
            industryTypeCode: addhycode.value,
            productType: hyglbslxvalue.value,
            industryLevel: hyglgzlbvalue.value
        }
    } else {
        obj = {
            industryName: addhyname.value,
            industryTypeCode: addhycode.value,
            productType: hyglbslxvalue.value
        }
    }
    addwesureindustryapi(obj).then((res: any) => {
        console.log(res, '添加行业')
        if (res.code === 200) {
            ElMessage({
                message: '添加成功',
                type: 'success'
            })
            getwesureindustrylist()
            addhytc.value = false
        }
    })
    // if (addhydaycode.value === '') {
    //     addwesureindustryapi([{
    //         industryName: addhyname.value,
    //         industryTypeCode: addhytyrbcode.value,
    //         productType: 1
    //     }]).then((res: any) => {
    //         console.log(res, '添加行业')
    //         if (res.code === 200) {
    //             ElMessage({
    //                 message: "添加成功",
    //                 type: "success"
    //             })
    //             addhytc.value = false
    //         }
    //     })
    // } else if (addhytyrbcode.value === '') {
    //     addwesureindustryapi([{
    //         industryName: addhyname.value,
    //         industryTypeCode: addhydaycode.value,
    //         productType: 1
    //     }]).then((res: any) => {
    //         console.log(res, '添加行业')
    //         if (res.code === 200) {
    //             ElMessage({
    //                 message: "添加成功",
    //                 type: "success"
    //             })
    //             addhytc.value = false
    //         }
    //     })
    // } else {
    //     addwesureindustryapi(
    //         [{
    //             industryName: addhyname.value,
    //             industryTypeCode: addhydaycode.value,
    //             productType: 0
    //         },
    //         {
    //             industryName: addhyname.value,
    //             industryTypeCode: addhytyrbcode.value,
    //             productType: 1
    //         }
    //         ]
    //     ).then((res: any) => {
    //         console.log(res, '添加行业')
    //         if (res.code === 200) {
    //             ElMessage({
    //                 message: "添加成功",
    //                 type: "success"
    //             })
    //             addhytc.value = false
    //         }
    //     })
    // }
}
const addhycode = ref('')
const addhytyrbcode = ref('')
const addhydaycode = ref('')
const addhyname = ref('')
const edithytyrbcode = ref('')
const edithydaycode = ref('')
const edithyname = ref('')
const changehyname = () => {
    shake(getwesureindustrylist, 400)
}
const changehybmname = () => {
    shake(getwesureindustrylist, 400)
}
const editflag = ref(3)
const edithytcopen = (val: any) => {
    console.log(val, 'valvalvalval')
    edithyname.value = val.industryName
    edithycode.value = val.industryTypeCode
    edithyid.value = val.id
    edithttype.value = val.productType
    if (val.productType === 2) {
        edithyglgzlbvalue.value = val.industryLevel
    }
    // if (val.industryTypeCode === undefined) {
    //     console.log(11111111111111)
    //     editflag.value = 2
    //     edithyname.value = val.industryName
    //     edithytyrbcode.value = val.industryTypeCodeTYX
    //     edittyrbhyid.value = val.tyrbid
    // } else if (val.industryTypeCodeTYX === undefined) {
    //     console.log(22222222)
    //     editflag.value = 1
    //     edithyname.value = val.industryName
    //     edithydaycode.value = val.industryTypeCode
    //     editdayhyid.value = val.dayid
    // } else {
    //     console.log(322222)
    //     editflag.value = 3
    //     edithyname.value = val.industryName
    //     edithydaycode.value = val.industryTypeCode
    //     edithytyrbcode.value = val.industryTypeCodeTYX
    //     editdayhyid.value = val.dayid
    //     edittyrbhyid.value = val.tyrbid
    // }
    edithytc.value = true
}
const edithttype = ref<any>('')
const edithycode = ref<any>('')
const edithyid = ref<any>(null)
const editdayhyid = ref<any>(null)
const edittyrbhyid = ref<any>(null)
const edithytc = ref(false)
const addhytc = ref(false)
const clearhyform = () => {
    hyname.value = ''
    hybmname.value = ''
    getwesureindustrylist()
}
const getwesureindustrylist = () => {
    getwesureindustrylistapi({
        pageNum: hypagenum.value,
        pageSize: hypagesize.value,
        industryName: hyname.value,
        industryTypeCode: hybmname.value,
        productType: hyglbslxselectvalue.value
    }).then((res: any) => {
        console.log(res, '查询行业列表111')
        // res.rows.forEach((item: any) => {
        //     item.wesureIndustryList.forEach((v: any) => {
        //         if (v.productType == 0) {
        //             Object.assign(item, { dayid: v.id, createTime: v.createTime, industryTypeCode: v.industryTypeCode, isDelete: v.isDelete })
        //         } else if (v.productType == 1) {
        //             Object.assign(item, { tyrbid: v.id, createTime: v.createTime, industryTypeCodeTYX: v.industryTypeCode, isDelete: v.isDelete })
        //         }
        //     })
        // })
        hytabledate.value = res.rows
        hytotal.value = res.total
    })
}
const changehypagesize = (val: any) => {
    hypagesize.value = val
    hypagenum.value = 1
    getwesureindustrylist()
}
const changehypagenum = (val: any) => {
    hypagenum.value = val
    getwesureindustrylist()
}
const hypagesize = ref(10)
const hypagenum = ref(1)
const hyname = ref('')
const hybmname = ref('')
const hytotal = ref(10)
const hytabledate = ref<any>([])
const changeeditfaformbxgs = (val: any) => {
    console.log(val)
    if (val === '') {
        cbsfalist.value = []
        editfaform.faname = ''
    } else {
        editfaform.faname = ''
        getquerydailycompanysolutionapi({ insureCompany: val }).then(
            (res: any) => {
                console.log(res, '保司方案')
                cbsfalist.value = res
            }
        )
    }
}
const cbsfalist = ref<any>([])
const cdaybslist = ref<any>([])
const editfagl = (val: any) => {
    getquerydailyinsurancecompanyapi().then((res: any) => {
        console.log(res, '保司')
        cdaybslist.value = res
    })
    editfaform.bxgs = ''
    editfaform.faname = ''
    editfaform.date = ''
    editfaform.hasfabc = false
    editfaform.remark = ''
    editfaform.fabm = ''
    editfaform.cbbf = ''
    editfaform.gspf = ''
    editfaform.gscj = ''
    editfaform.gsywyl = ''
    editfaform.zyjt = ''
    editfaform.price = ''
    editfaform.dw = ''
    changedayinsurefatc.value = true
    getwesureplandetailapi(val.id).then((res: any) => {
        console.log(res, '获取保险方案详细信息')
        editfaform.bxgs = res.insureCompanyType
        getquerydailycompanysolutionapi({
            insureCompany: res.insureCompanyType
        }).then((result: any) => {
            console.log(result, '保司方案')
            cbsfalist.value = result
        })
        editfaform.faname = res.planCode
        editfaform.date = res.effectYearMonth
        editfaform.hasfabc = res.isAlias === 0 ? false : true
        editfaform.remark = res.remark
        editfaform.fabm = res.planAlias
        editfaform.cbbf = res.costPrice
        wesureScopeList.value = val.wesurePlanJson
            .substring(0, val.wesurePlanJson.length - 1)
            .substr(1)
            .replace(/"/g, '')
            .split(',')
        val.wesurePlanJson
            .substring(0, val.wesurePlanJson.length - 1)
            .substr(1)
            .replace(/"/g, '')
            .split(',')
            .forEach((ele: any) => {
                if (ele.split(':')[0] === '工伤残疾') {
                    editfaform.gscj = ele.split(':')[1]
                } else if (ele.split(':')[0] === '住院津贴') {
                    editfaform.zyjt = ele.split(':')[1]
                } else if (ele.split(':')[0] === '工伤赔付') {
                    editfaform.gspf = ele.split(':')[1]
                } else if (ele.split(':')[0] === '工伤意外医疗') {
                    editfaform.gsywyl = ele.split(':')[1]
                }
            })
        editfaform.price = res.price
        editfaform.dw = res.unit
    })
}
const wesureScopeList = ref<any>([])
const editfaform = reactive({
    bxgs: '',
    faname: '',
    date: '',
    hasfabc: false,
    remark: '',
    fabm: '',
    cbbf: '',
    gspf: '',
    gscj: '',
    gsywyl: '',
    zyjt: '',
    price: '',
    dw: ''
})
const getquerydailyinsurancecompany = () => {
    getquerydailyinsurancecompanyapi().then((res: any) => {
        console.log(res, '保司')
        daybslist.value = res
    })
}
const getquerydailycompanysolution = (val: any) => {
    getquerydailycompanysolutionapi({ insureCompany: val }).then((res: any) => {
        console.log(res, '保司方案')
        bsfalist.value = res
    })
}
const changedayinsurefatc = ref(false)
const clearfaglform = () => {
    rbfplanCode.value = ''
    rbfainsureCompanyType.value = ''
    getwesureplanlist()
}
const bsfalist = ref<any>([])
const changerbfainsureCompanyType = (val: any) => {
    console.log(val, 'valvalavla')
    if (val === '') {
        bsfalist.value = []
        rbfplanCode.value = ''
    } else {
        getquerydailycompanysolution(val)
    }
    getwesureplanlist()
}
const daybslist = ref<any>([])
const getwesureplanlist = () => {
    getwesureplanlistapi({
        pageNum: rbfapagenum.value,
        pageSize: rbfapagesize.value,
        planCode: rbfplanCode.value,
        insureCompanyType: rbfainsureCompanyType.value,
        types: '1,5'
    }).then((res: any) => {
        console.log(res, '查询日保方案')
        rbfapagetotal.value = res.total
        rbfptabledate.value = res.rows
    })
}
const changerbfapagesize = (val: number) => {
    rbfapagesize.value = val
    rbfapagenum.value = 1
    getwesureplanlist()
}
const changerbfapagenum = (val: number) => {
    rbfapagenum.value = val
    getwesureplanlist()
}
const rbfainsureCompanyType = ref('')
const rbfapagesize = ref(10)
const rbfapagenum = ref(1)
const rbfapagetotal = ref(0)
const rbfplanCode = ref('')
const rbfptabledate = ref<any>([])
const insurecompanyflag = ref(0)
const changeinsurecompany = (i: number, ele: any) => {
    insurecompanyflag.value = i
    bsbm.value = ele.code
    console.log(ele, 'elelelelelele')
    getinsurComInsuranceCompanygetSchemecode.value = ele.code
    getinsurComInsuranceCompanygetScheme()
}
const outtabflag = ref(0)
// 切换tab
const changeouttab = (i: number) => {
    console.log(i)
    if (i === 0) {
        console.log('方案管理')
        getwesureplanlist()
        getquerydailyinsurancecompany()
    } else if (i === 1) {
        console.log('行业管理')
        getwesureindustrylist()
    } else if (i === 3) {
        console.log('行业方案管理')
        getwesureindustryplanlist()
    } else if (i === 2) {
        const y = new Date().getFullYear()
        const m =
            new Date().getMonth() + 1 >= 10
                ? new Date().getMonth() + 1
                : `0${new Date().getMonth() + 1}`
        bsbdhdate.value = `${y}-${m}`
        console.log(bsbdhdate.value)
        console.log('保司管理')
        getinsurComInsuranceCompanylist()
    }
    outtabflag.value = i
}
const back = () => {
    window.history.back()
}
</script>

<style lang="scss" scoped>
.tcbox {
    margin-top: -20px;
    padding-top: 16px;
    width: 100%;
    box-sizing: border-box;
    border-top: 1px solid #f4f4f7;

    .lable {
        margin-bottom: 12px;
        font-size: 14px;
    }

    .lablecontent {
        margin-bottom: 12px;
    }

    .formbox {
        display: flex;
        justify-content: space-between;

        .formboxitem {
            flex-shrink: 0;
            width: 48%;
        }
    }
}

.titlebox {
    width: 100%;
    box-sizing: border-box;
    border-left: 4px solid #0256ff;
    height: 14px;
    margin-bottom: 16px;
    padding-left: 8px;
    font-size: 14px;
}

.flexcenterbox {
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer {
    .closedrawer {
        cursor: pointer;
        position: fixed;
        top: 50px;
        right: 35%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 59px;
        background-color: #0256ff;
        font-size: 14px;
        color: #ffffff;

        img {
            margin-top: 5px;
        }
    }
}

.popoverfn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #565868;
    font-size: 14px;
    height: 34px;
    line-height: 34px;
    cursor: pointer;
}

.popoverfn:hover {
    background-color: #ebeffe;
    color: #3e5ff5;
}

.paddingbox_l {
    width: 350px;
    background-color: #ffffff;
    box-sizing: border-box;
    padding: 24px;
    margin-right: 16px;
    border-radius: 8px;
    height: 81vh;
    overflow: auto;

    .paddingbox_ltitle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 8px;
        border-bottom: 1px solid #f4f4f7;
        font-size: 14px;
        font-weight: 700;
        color: #202536;
    }

    .insurecompanylist:hover {
        background-color: #ebeffe;
        border-radius: 4px;
    }

    .insurecompanylist {
        width: 100%;
        box-sizing: border-box;
        padding: 6px 12px 6px 8px;
        display: flex;
        align-items: center;

        .insurelogo {
            width: 40px;
            height: 40px;
            border-radius: 5px;
            border: 1px solid #ffffff;
        }

        .companyinfo {
            flex: 1;
            padding-left: 12px;

            .insurename {
                font-size: 14px;
                color: #202536;
                margin-right: 8px;
            }

            .insureengname {
                font-size: 12px;
                color: #565868;
            }

            .insurecode {
                margin-top: 6px;
                color: #9497b1;
                font-size: 12px;
            }
        }

        .moreimg {
            width: 24px;
            height: 24px;
        }
    }
}

.paddingbox_r {
    background-color: #ffffff;
    flex: 1;
    box-sizing: border-box;
    padding: 24px;
    border-radius: 8px;
    height: 81vh;
    overflow: auto;

    .form {
        margin-top: 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;

        span {
            color: #202536;
            font-size: 14px;
        }
    }

    .toptitle {
        font-size: 16px;
        color: #202536;
        margin-bottom: 12px;
        font-weight: 600;
    }
}

.tableborder {
    border: 1px solid #eaeaef;
    border-bottom: none !important;
}

.paginationborder {
    border: 1px solid #eaeaef;
    padding-bottom: 16px;
}

.accounttable {
    width: 100%;
    box-sizing: border-box;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 24px;
}

.formbox {
    background-color: #ffffff;
    width: 100%;
    box-sizing: border-box;
    padding: 0 8px;
    border-radius: 8px;

    .formcontent {
        padding: 0 12px 16px;
        width: 100%;
        box-sizing: border-box;
        display: flex; 
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;

        .formbtnitem {
            margin-top: 13px;
        }

        .formitem {
            margin-top: 16px;
            display: flex;
            align-items: center;

            .formitemflexone {
                display: flex;
                align-items: center;
                flex: 1;
                margin-right: 42px;
            }

            .lable {
                min-width: 100px;
                font-size: 14px;
                color: #202536;
                margin-right: 8px;
            }
        }
    }

    .top {
        width: 100%;
        box-sizing: border-box;
        display: flex;
        justify-content: space-between;
        padding: 16px 8px;
        align-items: center;
        border-bottom: 1px solid #f4f4f7;

        .toptext {
            color: #3d3d3d;
            font-size: 14px;
        }

        .utils {
            display: flex;
            align-items: center;
        }

        .clear {
            cursor: pointer;
            margin-right: 20px;
            margin-left: 24px;
            color: #9497b1;
            font-size: 14px;

            img {
                width: 16px;
                height: 16px;
                margin-right: 6px;
                margin-bottom: -3px;
            }
        }
    }
}

.paddingbox {
    width: 100%;
    box-sizing: border-box;
    padding: 16px;
}

.outtabbox {
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    padding: 0 24px;
    display: flex;
    align-items: center;
    background-color: #ffffff;

    .outtabitem {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 12px;
        min-width: 64px;
        margin-right: 32px;

        .border_b {
            width: 100%;
            height: 2px;
            box-sizing: border-box;
            padding: 0 14px;

            .line {
                width: 100%;
                background-color: #ffffff;
                height: 2px;
            }
        }

        .content {
            display: flex;
            align-items: center;
            margin-bottom: 12px;
            justify-content: center;
            min-width: 85px;
            position: relative;

            .tabtext {
                text-align: center;
                font-size: 16px;
                color: #9497b1;
            }

            .count {
                position: absolute;
                top: -5px;
                right: -4px;
                height: 14px;
                min-width: 16px;
                text-align: center;
                font-size: 12px;
                line-height: 14px;
                border-radius: 8px;
                background-color: #ff7642;
                color: #ffffff;
            }
        }
    }
}

.blueactiveword {
    color: #0256ff !important;
}

.blueactiveline {
    background-color: #0256ff !important;
}

.insurecompanylistactive {
    background-color: #ebeffe;
    border-radius: 4px;
}

.blue {
    color: #0256ff;
}

.pointer {
    cursor: pointer;
}

.vforbox {
    box-sizing: border-box;
    width: 500px;
    display: flex;
    align-items: center;
    flex-flow: wrap;

    .vfboxitem {
        margin-right: 8px;
        margin-bottom: 8px;
        min-width: 100px;
        box-sizing: border-box;
        padding: 4px 8px;
        background-color: #f4f4f7;
        border: 1px solid #f4f4f7;
        border-radius: 4px;
        font-size: 14px;
        color: #9497b1;
    }
}

.red {
    color: red;
}

.tbhyform {
    margin-top: -20px;

    .lable {
        font-size: 14px;
        margin-bottom: 16px;
    }

    .lablecontent {
        margin-bottom: 26px;
    }
}

.tableinnerbox {
    box-sizing: border-box;
    width: 100%;
    padding: 8px 21px;

    .tableinnerboxitem {
        border-bottom: 1px solid #fafafa;
        margin-top: 8px;

        .top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 8px;

            .topitem {
                flex: 1;
                flex-shrink: 0;
                display: flex;
                font-size: 12px;

                .lable {
                    color: #9497b1;
                }

                .lablecontent {
                    color: #202536;
                }
            }
        }

        .bottom {
            display: flex;
            margin-bottom: 24px;
            align-items: center;
            justify-content: space-between;

            .bottomitem {
                flex: 1;
                flex-shrink: 0;
                display: flex;
                font-size: 12px;

                .lable {
                    color: #9497b1;
                }

                .lablecontent {
                    color: #202536;
                }
            }
        }
    }
}

.hyfaqgjbox {
    margin-top: -24px;
    border-top: 1px solid #fafafc;

    .hyfagjformitem {
        display: flex;
        align-items: center;
        margin-top: 16px;
        margin-bottom: 18px;

        .lable {
            flex-shrink: 0;
            width: 100px;
        }
    }
}

.insureplanactivitybox {
    display: flex;

    .left {
        flex: 1;
        margin-right: 16px;
    }

    .right {
        width: 400px;
        height: 400px;
        border-radius: 4px;
        border: 1px solid #eaeaef;

        .righttitle {
            padding: 12px 16px;
            border-bottom: 1px solid #eaeaef;
            width: 100%;
            box-sizing: border-box;
            font-size: 14px;
            color: #3d3d3d;
        }

        .rightform {
            font-size: 14px;
            color: #202536;
            padding: 16px 22px;
            width: 100%;
            box-sizing: border-box;

            .formitem {
                display: flex;
                align-items: center;
                margin-bottom: 18px;

                .lable {
                    width: 120px;
                }
            }
        }
    }
}

.plsetbdhboxitem {
    display: flex;
    align-items: center;
    margin-bottom: 16px;

    .lable {
        text-align: end;
        width: 150px;
        padding-right: 10px;
        box-sizing: border-box;
    }
}

.editpolicytcbox {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 16px;

    .editpolicytcboxitem {
        display: flex;
        align-items: center;
        margin-bottom: 16px;

        .lable {
            width: 100px;
            text-align: end;
            margin-right: 10px;
        }
    }
}
.slh {
    width: 100px;
    height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.w-200 {
    width: 300px;
}
.inputw{
    width: 200px;
}
</style>
